[IMP]GOLEM Family : allow family creation from member, only if saved, with current member as first one

This commit is contained in:
Fabien BOURGEOIS 2018-01-29 16:01:36 +01:00
parent 4e2cee7d05
commit 05c11c52cd
3 changed files with 26 additions and 19 deletions

View File

@ -18,7 +18,7 @@
{
'name': 'GOLEM families',
'summary': 'GOLEM Members Families',
'version': '10.0.2.1.0',
'version': '10.0.2.1.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 09:04+0000\n"
"PO-Revision-Date: 2018-01-29 09:04+0000\n"
"POT-Creation-Date: 2018-01-29 14:59+0000\n"
"PO-Revision-Date: 2018-01-29 14:59+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -55,6 +55,9 @@ msgstr "Communication"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_count
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
msgid "Count"
msgstr "Nombre"
@ -102,26 +105,16 @@ 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
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Family"
msgstr "Famille"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
msgid "Family Count"
msgstr "Somme des membres de la famille"
#. module: golem_family
#: code:addons/golem_family/models/golem_family.py:49
#: code:addons/golem_family/models/golem_family.py:84
#: code:addons/golem_family/models/golem_family.py:48
#: code:addons/golem_family/models/golem_family.py:82
#, python-format
msgid "Family Members"
msgstr "Membres de la famille"
@ -133,7 +126,6 @@ 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 "Famille"
@ -198,6 +190,7 @@ 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_golem_member_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"
@ -240,6 +233,11 @@ msgstr "Partenaire"
msgid "Phone"
msgstr "Téléphone"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Please save new member before assigning a family."
msgstr "Merci de sauvegarder la fiche du nouveau membre avant de pouvoir lui assigner une famille."
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Put an internal note..."

View File

@ -26,8 +26,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<field name="lastname" position="before">
<field name="family_id" />
<field name="family_role" />
<field name="id" invisible="1" />
<field name="partner_id" invisible="1" />
<p class="oe_grey" colspan="2"
attrs="{'invisible': [('id', '!=', False)]}">
Please save new member before assigning a family.
</p>
<field name="family_id"
attrs="{'readonly': [('id', '=', False)]}"
context="{'default_member_ids': [(4, partner_id, False)]}" />
<field name="family_role"
attrs="{'readonly': [('id', '=', False)]}" />
</field>
<page name="other_page" position="before">
<page string="Family"