From 6eb8b69ad919830899460bc7581f85b42f3f3850 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 11 Jan 2018 10:03:55 +0100 Subject: [PATCH 01/27] Strart work search family --- golem_family/views/golem_member_views.xml | 14 ++++++++++++++ golem_season/models/golem_season.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 5e95540..65fd4b0 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -40,5 +40,19 @@ along with this program. If not, see . + + + GOLEM family search adaptations + golem.member + + + + + + + + + diff --git a/golem_season/models/golem_season.py b/golem_season/models/golem_season.py index be94f66..60d9acc 100644 --- a/golem_season/models/golem_season.py +++ b/golem_season/models/golem_season.py @@ -30,7 +30,7 @@ class GolemSeason(models.Model): name = fields.Char('Season name', copy=False) membership_id = fields.Many2one('product.template', 'Membership type', - domain="[('membership', '=', True)]" ) + domain="[('membership', '=', True)]") member_counter = fields.Integer('Counter for member number generation', From 0bc15f059eabed20ec8f27e085f387f3c7dbbab3 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 11 Jan 2018 17:44:19 +0100 Subject: [PATCH 02/27] [TMP]Search family --- golem_family/views/golem_member_views.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 65fd4b0..d4a4d5b 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -46,11 +46,9 @@ along with this program. If not, see . golem.member - - - - + + + From 9bef8ef4caaf9ac6bd0eb6cac48b2773983be5e6 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 18 Jan 2018 11:07:36 +0100 Subject: [PATCH 03/27] [TMP] Sets as member address if there was no precedence --- golem_family/models/golem_family.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 4c8f0fa..7b5ed02 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -98,6 +98,18 @@ class GolemFamily(models.Model): for family in self: family.count = len(family.member_ids) + @api.onchange('member_ids') + def onchange_member(self): + """ Sets as member address if there was no precedence """ + for family in self: + if not family.street or family.street2 or family.zip or \ + family.city or family.state_id or family.country_id: + family.street = family.member_ids.street + family.street2 = family.member_ids.street2 + family.zip = family.member_ids.zip + family.city = family.member_ids.city + family.state_id = family.member_ids.state_id + family.country_id = family.member_ids.country_id class GolemFamilyRole(models.Model): """ GOLEM Family Role """ From de2ac3d99b14b69506cb540d9db4aa0df5d3ab46 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 18 Jan 2018 11:29:41 +0100 Subject: [PATCH 04/27] [TMP] Remove smart button family --- golem_family/views/golem_member_views.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index d4a4d5b..0cd02f4 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -25,14 +25,6 @@ along with this program. If not, see . golem.member -
- -
From 39fc7085b2eef7ef6d8d801325d68ce60a27f495 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 18 Jan 2018 14:19:50 +0100 Subject: [PATCH 05/27] [TMP] Add groupe family --- golem_family/views/golem_member_views.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 0cd02f4..c5ea6a4 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -29,6 +29,23 @@ along with this program. If not, see . + + + + + + + + + + + + + + + + + From 30dad99689efdd72dd50e451edd188e9917f76db Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 18 Jan 2018 16:11:36 +0100 Subject: [PATCH 06/27] [TMP] change metode onchange_member --- golem_family/models/golem_family.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 7b5ed02..4c18ecc 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -39,7 +39,7 @@ class ResPartner(models.Model): 'view_mode': 'form', 'res_id': self.family_id.id} - +# code ici class GolemMember(models.Model): """ Member adaptations """ _inherit = 'golem.member' @@ -102,14 +102,16 @@ class GolemFamily(models.Model): def onchange_member(self): """ Sets as member address if there was no precedence """ for family in self: - if not family.street or family.street2 or family.zip or \ - family.city or family.state_id or family.country_id: - family.street = family.member_ids.street - family.street2 = family.member_ids.street2 - family.zip = family.member_ids.zip - family.city = family.member_ids.city - family.state_id = family.member_ids.state_id - family.country_id = family.member_ids.country_id + if family.id: + if not any({'family.street': False, 'family.street2': False, \ + 'family.zip': False, 'family.city': False, \ + 'family.state_id': False, 'family.country_id': False}): + family.street = family.member_ids.street + family.street2 = family.member_ids.street2 + family.zip = family.member_ids.zip + family.city = family.member_ids.city + family.state_id = family.member_ids.state_id + family.country_id = family.member_ids.country_id class GolemFamilyRole(models.Model): """ GOLEM Family Role """ From 3c795728b54d1ad4f5dc5ed1edfe75956a12b3f9 Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 22 Jan 2018 09:26:22 +0100 Subject: [PATCH 07/27] / --- golem_family/models/golem_family.py | 20 ++++++-------------- golem_family/views/golem_member_views.xml | 2 -- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 4c18ecc..64ae06f 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -98,20 +98,12 @@ class GolemFamily(models.Model): for family in self: family.count = len(family.member_ids) - @api.onchange('member_ids') - def onchange_member(self): - """ Sets as member address if there was no precedence """ - for family in self: - if family.id: - if not any({'family.street': False, 'family.street2': False, \ - 'family.zip': False, 'family.city': False, \ - 'family.state_id': False, 'family.country_id': False}): - family.street = family.member_ids.street - family.street2 = family.member_ids.street2 - family.zip = family.member_ids.zip - family.city = family.member_ids.city - family.state_id = family.member_ids.state_id - family.country_id = family.member_ids.country_id + # @api.onchange('member_ids') + # def onchange_member(self): + # """ Sets as member address if there was no precedence """ + # for family in self: + # if not any({'family.street': False}): + # self.update({'family.street': family.member_ids.street}) class GolemFamilyRole(models.Model): """ GOLEM Family Role """ diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index c5ea6a4..dad1b4a 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -31,7 +31,6 @@ along with this program. If not, see . - @@ -43,7 +42,6 @@ along with this program. If not, see . - From e5cf4ad9d4049677d8f5819a365dea2e2c87e052 Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 22 Jan 2018 12:37:06 +0100 Subject: [PATCH 08/27] [TMP] change metode onchange_member --- golem_family/models/golem_family.py | 12 ++++++------ golem_family/views/golem_member_views.xml | 7 ------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 64ae06f..a13fa55 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -98,12 +98,12 @@ class GolemFamily(models.Model): for family in self: family.count = len(family.member_ids) - # @api.onchange('member_ids') - # def onchange_member(self): - # """ Sets as member address if there was no precedence """ - # for family in self: - # if not any({'family.street': False}): - # self.update({'family.street': family.member_ids.street}) + @api.onchange('member_ids') + def onchange_member(self): + """ Sets as member address if there was no precedence """ + for family in self: + if not any ({'family.street': True}): + self.update({'family.street': family.member_ids.street}) class GolemFamilyRole(models.Model): """ GOLEM Family Role """ diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index dad1b4a..2d1e17e 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -34,13 +34,6 @@ along with this program. If not, see . - - - - - - - From 57c206039e702d4034bd5e53d9fe364428199832 Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 22 Jan 2018 17:18:49 +0100 Subject: [PATCH 09/27] / --- golem_family/models/golem_family.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index a13fa55..bce3531 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -102,8 +102,9 @@ class GolemFamily(models.Model): def onchange_member(self): """ Sets as member address if there was no precedence """ for family in self: - if not any ({'family.street': True}): - self.update({'family.street': family.member_ids.street}) + if not any((family.street, family.street2)): + family.update({'street': family.member_ids[0].street, + 'street2': family.member_ids[0].street2}) class GolemFamilyRole(models.Model): """ GOLEM Family Role """ From 79c683b04786de88b585c5509c8389b921aaf69b Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 22 Jan 2018 17:47:50 +0100 Subject: [PATCH 10/27] [TMP]Onchange adresse family --- golem_family/models/golem_family.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index bce3531..18e6014 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -102,9 +102,13 @@ class GolemFamily(models.Model): def onchange_member(self): """ Sets as member address if there was no precedence """ for family in self: - if not any((family.street, family.street2)): - family.update({'street': family.member_ids[0].street, - 'street2': family.member_ids[0].street2}) + if family.member_ids: + if not any((family.street, family.street2)): + family.update({'street': family.member_ids[0].street, + 'street2': family.member_ids[0].street2, + 'zip': family.member_ids[0].zip, + 'city': family.member_ids[0].city + }) class GolemFamilyRole(models.Model): """ GOLEM Family Role """ From 1f974cc217d46191a00e88dd27018f732a227096 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 10:42:15 +0100 Subject: [PATCH 11/27] [TMP]No delete member in member family list --- golem_family/views/golem_family_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golem_family/views/golem_family_views.xml b/golem_family/views/golem_family_views.xml index d30f519..543a827 100644 --- a/golem_family/views/golem_family_views.xml +++ b/golem_family/views/golem_family_views.xml @@ -66,8 +66,8 @@ along with this program. If not, see . - - + + From 94df44087bfbccb12a219d08625fafb46ec8c386 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 11:12:48 +0100 Subject: [PATCH 12/27] [TMP]context check --- golem_family/views/golem_member_views.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 2d1e17e..fe4e865 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -26,17 +26,10 @@ along with this program. If not, see . - + - - - - - - - - From 1a57c993e136f42da52efb58e1ee3c898d2a5af5 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 11:14:39 +0100 Subject: [PATCH 13/27] [TMP]update if family.member --- golem_family/models/golem_family.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 18e6014..bf47690 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -101,14 +101,13 @@ class GolemFamily(models.Model): @api.onchange('member_ids') def onchange_member(self): """ Sets as member address if there was no precedence """ - for family in self: - if family.member_ids: - if not any((family.street, family.street2)): - family.update({'street': family.member_ids[0].street, - 'street2': family.member_ids[0].street2, - 'zip': family.member_ids[0].zip, - 'city': family.member_ids[0].city - }) + for family in self: + if family.member_ids and not any((family.street, family.street2)): + family.update({'street': family.member_ids[0].street, + 'street2': family.member_ids[0].street2, + 'zip': family.member_ids[0].zip, + 'city': family.member_ids[0].city + }) class GolemFamilyRole(models.Model): """ GOLEM Family Role """ From 5714cab5adad557583a4ef9166729395fd73ed0e Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 11:36:54 +0100 Subject: [PATCH 14/27] [TMP]Add test on zip and city --- golem_family/models/golem_family.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index bf47690..9819b76 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -101,8 +101,9 @@ class GolemFamily(models.Model): @api.onchange('member_ids') def onchange_member(self): """ Sets as member address if there was no precedence """ - for family in self: - if family.member_ids and not any((family.street, family.street2)): + for family in self: + if family.member_ids and not any((family.street, family.street2,\ + family.zip, family.city)): family.update({'street': family.member_ids[0].street, 'street2': family.member_ids[0].street2, 'zip': family.member_ids[0].zip, From ff6b67e27bc08f32ce9b921d6a877f9a2b65e807 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 15:00:02 +0100 Subject: [PATCH 15/27] [TMP] Add Sets as family address if there was no precedence --- golem_family/models/golem_family.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 9819b76..fb748cd 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -39,7 +39,19 @@ class ResPartner(models.Model): 'view_mode': 'form', 'res_id': self.family_id.id} -# code ici + @api.onchange('family_id') + def onchange_member(self): + """ Sets as family address if there was no precedence """ + for member in self: + if not any((member.lastname, member.street, member.street2, \ + member.zip, member.city)): + member.update({'lastname': member.family_id[0].name, + 'street': member.family_id[0].street, + 'street2': member.family_id[0].street2, + 'zip': member.family_id[0].zip, + 'city': member.family_id[0].city + }) + class GolemMember(models.Model): """ Member adaptations """ _inherit = 'golem.member' From 6d206e079565f5d691d1e3bcad2e53914f920e18 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 15:28:56 +0100 Subject: [PATCH 16/27] [TMP] check if member.family_id --- golem_family/models/golem_family.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index fb748cd..9e268c3 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -40,12 +40,12 @@ class ResPartner(models.Model): 'res_id': self.family_id.id} @api.onchange('family_id') - def onchange_member(self): + def onchange_family(self): """ Sets as family address if there was no precedence """ for member in self: - if not any((member.lastname, member.street, member.street2, \ - member.zip, member.city)): - member.update({'lastname': member.family_id[0].name, + if member.family_id and not any((member.lastname, member.street, \ + member.street2, member.zip, member.city)): + member.update({'lastname': member.family_id.name, 'street': member.family_id[0].street, 'street2': member.family_id[0].street2, 'zip': member.family_id[0].zip, From 79222a4b945fb9c32a2cc4e993fbb601cce4028d Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 23 Jan 2018 16:16:40 +0100 Subject: [PATCH 17/27] [TMP] add context default_family_id --- golem_family/views/golem_family_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golem_family/views/golem_family_views.xml b/golem_family/views/golem_family_views.xml index 543a827..b3671ff 100644 --- a/golem_family/views/golem_family_views.xml +++ b/golem_family/views/golem_family_views.xml @@ -66,7 +66,7 @@ along with this program. If not, see . - + From 3b300442b286db5789e1cdd54200089cbc70c353 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 25 Jan 2018 10:02:03 +0100 Subject: [PATCH 18/27] [TMP]Display family info in member --- golem_family/views/golem_member_views.xml | 17 +++++++++++++++++ golem_member/models/golem_member.py | 3 +++ 2 files changed, 20 insertions(+) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index fe4e865..7c263c0 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -30,6 +30,23 @@ along with this program. If not, see . context="{'default_member_ids': [(4, partner_id, False)]}"/> + + + + + + + + + + + + + + + + + diff --git a/golem_member/models/golem_member.py b/golem_member/models/golem_member.py index 4329236..e26cd7a 100644 --- a/golem_member/models/golem_member.py +++ b/golem_member/models/golem_member.py @@ -79,6 +79,9 @@ class GolemMember(models.Model): partner_id = fields.Many2one('res.partner', required=True, index=True, ondelete='cascade') + + member_ids = fields.One2many('res.partner', 'family_id', 'Members', + domain=[('is_company', '=', False)]) @api.model def _default_season(self): From 4232d3da7365bed6d89e63bb72868886a135508d Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 25 Jan 2018 10:13:36 +0100 Subject: [PATCH 19/27] [TMP]Title style --- golem_family/views/golem_member_views.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 7c263c0..01f96c4 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -31,10 +31,15 @@ along with this program. If not, see . - +
Family form
+
+

+

+
From d69f8f7a10238634c64ab9c3b20bfae35f50d183 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 25 Jan 2018 13:39:07 +0100 Subject: [PATCH 20/27] [TMP]Family form in member form --- golem_family/views/golem_member_views.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 01f96c4..b403b09 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -35,11 +35,7 @@ along with this program. If not, see .
Family form
-
-

- -

-
+
From 08510d07623861d7fd8861b478db89750953506a Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 25 Jan 2018 14:26:59 +0100 Subject: [PATCH 21/27] [TMP]Family form in member form --- golem_family/models/golem_family.py | 2 ++ golem_family/views/golem_member_views.xml | 8 ++++++-- golem_member/models/golem_member.py | 5 ++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index 9e268c3..e8167b5 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -24,6 +24,8 @@ class ResPartner(models.Model): """ Partner adaptations """ _inherit = 'res.partner' + family_member_ids = fields.One2many(related='family_id.member_ids') + family_id = fields.Many2one('golem.family', string='Family', index=True) family_role = fields.Many2one('golem.family.role', string='Role', index=True) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index b403b09..f7f4238 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -35,9 +35,13 @@ along with this program. If not, see .
Family form
- + - + diff --git a/golem_member/models/golem_member.py b/golem_member/models/golem_member.py index e26cd7a..ccb9b0a 100644 --- a/golem_member/models/golem_member.py +++ b/golem_member/models/golem_member.py @@ -43,6 +43,7 @@ class ResPartner(models.Model): is_member = fields.Boolean('Is member', compute='_compute_is_member') member_number = fields.Char('Member number', related='member_id.number') + @api.depends('member_id') def _compute_is_member(self): """ Computes is member """ @@ -79,9 +80,7 @@ class GolemMember(models.Model): partner_id = fields.Many2one('res.partner', required=True, index=True, ondelete='cascade') - - member_ids = fields.One2many('res.partner', 'family_id', 'Members', - domain=[('is_company', '=', False)]) + @api.model def _default_season(self): From ed34d84a18e06ac23c7b5e3a238db50370b2f07b Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 25 Jan 2018 15:45:06 +0100 Subject: [PATCH 22/27] / --- golem_family/views/golem_member_views.xml | 24 ++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index f7f4238..c3fc4cf 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -35,11 +35,25 @@ along with this program. If not, see .
Family form
- + + + + + + + + + + + + + + + + + From cc0c6b9b612d90191f95584c22e74cacdda5edda Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 26 Jan 2018 13:51:37 +0100 Subject: [PATCH 23/27] [TMP]If family member family notbook is visible --- golem_family/models/golem_family.py | 11 ++++ golem_family/views/golem_member_views.xml | 76 ++++++++++++++--------- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index e8167b5..e294c33 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -24,7 +24,18 @@ class ResPartner(models.Model): """ Partner adaptations """ _inherit = 'res.partner' + family_member = fields.Many2one(related='family_id') family_member_ids = fields.One2many(related='family_id.member_ids') + family_street = fields.Char(related='family_id.street') + family_street2 = fields.Char(related='family_id.street2') + family_zip = fields.Char(related='family_id.zip') + family_city = fields.Char(related='family_id.city') + family_state_id = fields.Many2one(related='family_id.state_id') + family_country_id = fields.Many2one(related='family_id.country_id') + family_phone = fields.Char(related='family_id.phone') + family_mobile = fields.Char(related='family_id.mobile') + family_email = fields.Char(related='family_id.email') + family_website = fields.Char(related='family_id.website') family_id = fields.Many2one('golem.family', string='Family', index=True) family_role = fields.Many2one('golem.family.role', string='Role', diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index c3fc4cf..0a867c1 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -31,41 +31,55 @@ along with this program. If not, see . - -
Family form
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - - - - - - - - -
-
From 213fe4005cd7fc5ff955f8c0b564926271c34fac Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 26 Jan 2018 17:51:50 +0100 Subject: [PATCH 24/27] [tmp]/ --- golem_family/views/golem_member_views.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 0a867c1..22897e3 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -31,12 +31,11 @@ along with this program. If not, see . - - + - @@ -76,7 +75,6 @@ along with this program. If not, see .
-
From 36b0440dd63c8cf179df82cf94a33f4d4e35e6ef Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 26 Jan 2018 19:03:51 +0100 Subject: [PATCH 25/27] [TMP] form family in form member and translate fr --- golem_family/i18n/fr.po | 62 +++++++++++++++++++---- golem_family/i18n/golem_family.pot | 56 ++++++++++++++++++-- golem_family/views/golem_member_views.xml | 21 ++++---- 3 files changed, 113 insertions(+), 26 deletions(-) diff --git a/golem_family/i18n/fr.po b/golem_family/i18n/fr.po index 6e7f7ca..00d4356 100644 --- a/golem_family/i18n/fr.po +++ b/golem_family/i18n/fr.po @@ -6,15 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-05 15:26+0000\n" -"PO-Revision-Date: 2017-06-28 17:30+0000\n" +"POT-Creation-Date: 2018-01-26 17:48+0000\n" +"PO-Revision-Date: 2018-01-26 17:48+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: \n" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_tree @@ -23,11 +22,13 @@ msgstr "# de membres" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "0000000000" msgstr "0000000000" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Address" msgstr "Adresse" @@ -38,12 +39,17 @@ msgstr "Par ville" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_city +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_city +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_city +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_city #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "City" msgstr "Ville" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Communication" msgstr "Communication" @@ -54,7 +60,11 @@ msgstr "Nombre" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_country_id #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Country" msgstr "Pays" @@ -78,6 +88,9 @@ msgstr "Nom affiché" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_email +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_email +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_email +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_email msgid "Email" msgstr "Courriel" @@ -89,9 +102,13 @@ msgstr "Familles" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member #: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member #: model:ir.model.fields,field_description:golem_family.field_res_users_family_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_family_search_inherit_golem_membership msgid "Family" msgstr "Famille" @@ -103,8 +120,8 @@ msgid "Family Count" msgstr "Somme des membres de la famille" #. module: golem_family -#: code:addons/golem_family/models/golem_family.py:36 -#: code:addons/golem_family/models/golem_family.py:59 +#: code:addons/golem_family/models/golem_family.py:49 +#: code:addons/golem_family/models/golem_family.py:84 #, python-format msgid "Family Members" msgstr "Membres de la famille" @@ -116,6 +133,7 @@ msgstr "Family form" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Family members" msgstr "Membres de la famille" @@ -180,11 +198,16 @@ msgstr "Dernière mise à jour le" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_ids +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_ids msgid "Members" msgstr "Adhérents" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_mobile msgid "Mobile" msgstr "Mobile" @@ -211,6 +234,9 @@ msgstr "Partenaire" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_phone +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_phone +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_phone +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_phone msgid "Phone" msgstr "Téléphone" @@ -234,50 +260,68 @@ msgstr "Roles" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_state_id #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "State" msgstr "Région" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_street +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street msgid "Street" msgstr "Rue" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Street..." msgstr "Rue..." #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street2 msgid "Street2" msgstr "Complément de rue" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_website +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_website +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_website +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_website msgid "Website" msgstr "Site Web" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "ZIP" msgstr "Code postal" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_zip +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_zip +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_zip +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_zip msgid "Zip" msgstr "Code postal" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "e.g. www.odoo.com" msgstr "e.g. www.yaltik.com" #. module: golem_family -#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family #: model:ir.ui.view,arch_db:golem_family.res_partner_form_inherit_golem_family msgid "family members" -msgstr "famille" +msgstr "Famille" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_kanban @@ -286,6 +330,6 @@ msgstr "membres" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "name@example.org" msgstr "name@example.org" - diff --git a/golem_family/i18n/golem_family.pot b/golem_family/i18n/golem_family.pot index 0dd31d7..67c546a 100644 --- a/golem_family/i18n/golem_family.pot +++ b/golem_family/i18n/golem_family.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-05 15:26+0000\n" -"PO-Revision-Date: 2017-06-05 15:26+0000\n" +"POT-Creation-Date: 2018-01-26 17:48+0000\n" +"PO-Revision-Date: 2018-01-26 17:48+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -22,11 +22,13 @@ msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "0000000000" msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Address" msgstr "" @@ -37,12 +39,17 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_city +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_city +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_city +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_city #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "City" msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Communication" msgstr "" @@ -53,7 +60,11 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_country_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_country_id #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Country" msgstr "" @@ -77,6 +88,9 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_email +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_email +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_email +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_email msgid "Email" msgstr "" @@ -88,9 +102,13 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member #: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member #: model:ir.model.fields,field_description:golem_family.field_res_users_family_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_family_search_inherit_golem_membership msgid "Family" msgstr "" @@ -102,8 +120,8 @@ msgid "Family Count" msgstr "" #. module: golem_family -#: code:addons/golem_family/models/golem_family.py:36 -#: code:addons/golem_family/models/golem_family.py:59 +#: code:addons/golem_family/models/golem_family.py:49 +#: code:addons/golem_family/models/golem_family.py:84 #, python-format msgid "Family Members" msgstr "" @@ -115,6 +133,7 @@ msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Family members" msgstr "" @@ -179,11 +198,16 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_ids +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_ids msgid "Members" msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_mobile +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_mobile msgid "Mobile" msgstr "" @@ -210,6 +234,9 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_phone +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_phone +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_phone +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_phone msgid "Phone" msgstr "" @@ -233,47 +260,65 @@ msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_state_id +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_state_id #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "State" msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_street +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street msgid "Street" msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Street..." msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street2 +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street2 msgid "Street2" msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_website +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_website +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_website +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_website msgid "Website" msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "ZIP" msgstr "" #. module: golem_family #: model:ir.model.fields,field_description:golem_family.field_golem_family_zip +#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_zip +#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_zip +#: model:ir.model.fields,field_description:golem_family.field_res_users_family_zip msgid "Zip" msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "e.g. www.odoo.com" msgstr "" #. module: golem_family -#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family #: model:ir.ui.view,arch_db:golem_family.res_partner_form_inherit_golem_family msgid "family members" msgstr "" @@ -285,6 +330,7 @@ msgstr "" #. module: golem_family #: model:ir.ui.view,arch_db:golem_family.golem_family_form +#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "name@example.org" msgstr "" diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 22897e3..331047d 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -26,11 +26,10 @@ along with this program. If not, see . - + - + @@ -42,9 +41,9 @@ along with this program. If not, see . - - @@ -52,15 +51,15 @@ along with this program. If not, see . - - - - @@ -75,9 +74,7 @@ along with this program. If not, see .
- -
- +
From f033db0e1b0d1a6c4ba3bfa8774b1fc8ca847050 Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 29 Jan 2018 09:55:10 +0100 Subject: [PATCH 26/27] [TMP]famille to Famille --- golem_family/views/golem_member_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml index 331047d..39d9a20 100644 --- a/golem_family/views/golem_member_views.xml +++ b/golem_family/views/golem_member_views.xml @@ -30,7 +30,7 @@ along with this program. If not, see . - From 2c5ea62f0e5bde57b042e43f966b2ae55fc1a4ec Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 29 Jan 2018 10:16:17 +0100 Subject: [PATCH 27/27] [TMP]famille to Famille --- golem_family/i18n/fr.po | 6 +++--- golem_family/i18n/golem_family.pot | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/golem_family/i18n/fr.po b/golem_family/i18n/fr.po index 00d4356..2c5fbbb 100644 --- a/golem_family/i18n/fr.po +++ b/golem_family/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-26 17:48+0000\n" -"PO-Revision-Date: 2018-01-26 17:48+0000\n" +"POT-Creation-Date: 2018-01-29 09:04+0000\n" +"PO-Revision-Date: 2018-01-29 09:04+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -135,7 +135,7 @@ msgstr "Family form" #: model:ir.ui.view,arch_db:golem_family.golem_family_form #: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family msgid "Family members" -msgstr "Membres de la famille" +msgstr "Famille" #. module: golem_family #: sql_constraint:golem.family.role:0 diff --git a/golem_family/i18n/golem_family.pot b/golem_family/i18n/golem_family.pot index 67c546a..a583d89 100644 --- a/golem_family/i18n/golem_family.pot +++ b/golem_family/i18n/golem_family.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-26 17:48+0000\n" -"PO-Revision-Date: 2018-01-26 17:48+0000\n" +"POT-Creation-Date: 2018-01-29 09:03+0000\n" +"PO-Revision-Date: 2018-01-29 09:03+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n"