forked from Yaltik/golem
Merge branch 'michel_famille'
This commit is contained in:
commit
f30bd35a81
@ -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"
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 """
|
||||
|
@ -66,8 +66,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Family members">
|
||||
<field name="member_ids" widget="many2many">
|
||||
<tree>
|
||||
<field name="member_ids" context="{'default_family_id': active_id}">
|
||||
<tree delete="false">
|
||||
<field name="name" />
|
||||
<field name="family_role" />
|
||||
<field name="phone" />
|
||||
|
@ -25,17 +25,67 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="model">golem.member</field>
|
||||
<field name="inherit_id" ref="golem_member.golem_member_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="buttons" position="inside">
|
||||
<button class="oe_inline oe_stat_button" type="object"
|
||||
name="button_family_members" icon="fa-users"
|
||||
attrs="{'invisible': [('family_id', '=', False)]}">
|
||||
<field string="family members" name="family_count"
|
||||
widget="statinfo" />
|
||||
</button>
|
||||
</div>
|
||||
<field name="lastname" position="before">
|
||||
<field name="family_id" />
|
||||
<field name="family_id" invisible="1" />
|
||||
<field name="family_role" />
|
||||
</field>
|
||||
<page name="other_page" position="before">
|
||||
<page string="Family"
|
||||
attrs="{'invisible': [('family_id', '=', False)]}">
|
||||
<group>
|
||||
<group string="Address">
|
||||
<group>
|
||||
<field name="family_street" placeholder="Street..." />
|
||||
<field name="family_street2" />
|
||||
<field name="family_zip" placeholder="ZIP" />
|
||||
<field name="family_city" placeholder="City" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="family_state_id" class="oe_no_button"
|
||||
placeholder="State" />
|
||||
<field name="family_country_id" placeholder="Country"
|
||||
class="oe_no_button" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Communication">
|
||||
<group>
|
||||
<field name="family_phone" placeholder="0000000000"
|
||||
widget="phonefr" />
|
||||
<field name="family_mobile" placeholder="0000000000"
|
||||
widget="phonefr" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="family_email" widget="email"
|
||||
placeholder="name@example.org" />
|
||||
<field name="family_website" widget="url"
|
||||
placeholder="e.g. www.odoo.com"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<field name="family_member_ids" context="{'default_family_id': active_id}">
|
||||
<tree delete="false">
|
||||
<field name="name" />
|
||||
<field name="family_role" />
|
||||
<field name="phone" />
|
||||
<field name="mobile" />
|
||||
<field name="email" widget="email" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- searches -->
|
||||
<record model="ir.ui.view" id="golem_family_search_inherit_golem_membership">
|
||||
<field name="name">GOLEM family search adaptations</field>
|
||||
<field name="model">golem.member</field>
|
||||
<field name="inherit_id" ref="golem_member.golem_member_search" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="family_id" string="Family" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -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 """
|
||||
|
Loading…
Reference in New Issue
Block a user