diff --git a/golem_member/__init__.py b/golem_member/__init__.py new file mode 100644 index 00000000..2fca3d29 --- /dev/null +++ b/golem_member/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from . import models diff --git a/golem_member/__openerp__.py b/golem_member/__openerp__.py new file mode 100644 index 00000000..405e1b35 --- /dev/null +++ b/golem_member/__openerp__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +{ + 'name': 'GOLEM non-profit members', + 'summary': 'Extends Odoo contacts for MJC', + 'description': 'Non-profit french MJC members management', + 'version': '0.1', + 'category': 'Non-profit management', + 'author': 'Fabien Bourgeois', + 'license': 'AGPL-3', + 'application': True, + 'installable': True, + 'depends': ['contacts', + 'partner_firstname', + 'partner_contact_birthdate', + 'partner_contact_gender', + 'partner_contact_nationality', + 'membership', + 'mail', + 'l10n_fr_state', + 'l10n_fr_department', + 'l10n_fr_tax_sale_ttc', + 'l10n_fr_naf_ape', + 'l10n_fr_siret', + 'web_widget_phone_check_fr', + 'web_widget_email_check', + 'web_widget_url_check'], + 'data': ['views/golem_member_view.xml'] +} diff --git a/golem_member/models/__init__.py b/golem_member/models/__init__.py new file mode 100644 index 00000000..8d289628 --- /dev/null +++ b/golem_member/models/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from . import golem_member diff --git a/golem_member/models/golem_member.py b/golem_member/models/golem_member.py new file mode 100644 index 00000000..4a102893 --- /dev/null +++ b/golem_member/models/golem_member.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from openerp import models, fields + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + def _get_default_nationality_id(self): + return self.env.ref('base.main_company').country_id + + nationality_id = fields.Many2one('res.country', 'Nationality', + default=_get_default_nationality_id) + + # Gender overwriting : no need for 'other' choice + gender = fields.Selection([('male', 'Male'), ('female', 'Female')]) + + +class GolemMember(models.Model): + """ GOLEM Member """ + _name = 'golem.member' + _inherit = 'mail.thread' + _inherits = {'res.partner': 'partner_id'} + + number = fields.Char('Number', size=50) + pictures_agreement = fields.Boolean('Pictures agreement?') diff --git a/golem_member/views/golem_member_view.xml b/golem_member/views/golem_member_view.xml new file mode 100644 index 00000000..7b72d6bf --- /dev/null +++ b/golem_member/views/golem_member_view.xml @@ -0,0 +1,158 @@ + + + + + + + + + GOLEM Member Form + golem.member + +
+ +
+

+ + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + + + GOLEM Member Tree/List + golem.member + + + + + + + + + + + + + + + GOLEM Member Filters + golem.member + + + + + + + + + + GOLEM Member Graph + golem.member + + + + + + + + + + + kanban + + + + + + +
+