diff --git a/golem_family/i18n/fr.po b/golem_family/i18n/fr.po
index 6e7f7ca..2c5fbbb 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-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"
"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,8 +133,9 @@ 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"
+msgstr "Famille"
#. module: golem_family
#: sql_constraint:golem.family.role:0
@@ -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..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: 2017-06-05 15:26+0000\n"
-"PO-Revision-Date: 2017-06-05 15:26+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"
@@ -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/models/golem_family.py b/golem_family/models/golem_family.py
index 4c8f0fa..e294c33 100644
--- a/golem_family/models/golem_family.py
+++ b/golem_family/models/golem_family.py
@@ -24,6 +24,19 @@ 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',
index=True)
@@ -39,6 +52,18 @@ class ResPartner(models.Model):
'view_mode': 'form',
'res_id': self.family_id.id}
+ @api.onchange('family_id')
+ def onchange_family(self):
+ """ Sets as family address if there was no precedence """
+ for member in self:
+ 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,
+ 'city': member.family_id[0].city
+ })
class GolemMember(models.Model):
""" Member adaptations """
@@ -98,6 +123,17 @@ 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.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,
+ 'city': family.member_ids[0].city
+ })
class GolemFamilyRole(models.Model):
""" GOLEM Family Role """
diff --git a/golem_family/views/golem_family_views.xml b/golem_family/views/golem_family_views.xml
index d30f519..b3671ff 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 .
-
-
+
+
diff --git a/golem_family/views/golem_member_views.xml b/golem_family/views/golem_member_views.xml
index 5e95540..39d9a20 100644
--- a/golem_family/views/golem_member_views.xml
+++ b/golem_family/views/golem_member_views.xml
@@ -25,17 +25,67 @@ along with this program. If not, see .
golem.member
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GOLEM family search adaptations
+ golem.member
+
+
+
+
diff --git a/golem_member/models/golem_member.py b/golem_member/models/golem_member.py
index 4329236..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 """
@@ -80,6 +81,7 @@ class GolemMember(models.Model):
partner_id = fields.Many2one('res.partner', required=True, index=True,
ondelete='cascade')
+
@api.model
def _default_season(self):
""" Get default season """