[REF][IMP]GOLEM Family single-parent small enhancements

This commit is contained in:
Fabien BOURGEOIS 2018-10-19 09:04:54 +02:00
parent 0bdf720b02
commit cc479d3908
5 changed files with 40 additions and 17 deletions

View File

@ -19,9 +19,9 @@
'name': 'GOLEM families', 'name': 'GOLEM families',
'summary': 'GOLEM Members Families', 'summary': 'GOLEM Members Families',
'description': 'GOLEM Members Families', 'description': 'GOLEM Members Families',
'version': '10.0.2.3.1', 'version': '10.0.2.4.0',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois', 'author': 'Fabien Bourgeois, Youssef El Ouahby',
'license': 'AGPL-3', 'license': 'AGPL-3',
'application': False, 'application': False,
'installable': True, 'installable': True,

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 10:12+0000\n" "POT-Creation-Date: 2018-10-19 07:03+0000\n"
"PO-Revision-Date: 2018-08-01 12:15+0200\n" "PO-Revision-Date: 2018-10-19 09:04+0200\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -145,8 +145,8 @@ msgid "Family"
msgstr "Famille" msgstr "Famille"
#. module: golem_family #. module: golem_family
#: code:addons/golem_family/models/golem_family.py:50 #: 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:83
#, python-format #, python-format
msgid "Family Members" msgid "Family Members"
msgstr "Membres de la famille" msgstr "Membres de la famille"
@ -308,6 +308,16 @@ msgstr "Role"
msgid "Roles" msgid "Roles"
msgstr "Roles" msgstr "Roles"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_single_parent
msgid "Single parent"
msgstr "Monoparentale"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "Single-parent"
msgstr "Monoparentale"
#. module: golem_family #. 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_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_golem_member_family_state_id
@ -388,3 +398,4 @@ msgstr "membres"
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family #: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "name@example.org" msgid "name@example.org"
msgstr "name@example.org" msgstr "name@example.org"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 10:12+0000\n" "POT-Creation-Date: 2018-10-19 07:03+0000\n"
"PO-Revision-Date: 2018-08-01 10:12+0000\n" "PO-Revision-Date: 2018-10-19 07:03+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -145,8 +145,8 @@ msgid "Family"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: code:addons/golem_family/models/golem_family.py:50 #: 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:83
#, python-format #, python-format
msgid "Family Members" msgid "Family Members"
msgstr "" msgstr ""
@ -308,6 +308,16 @@ msgstr ""
msgid "Roles" msgid "Roles"
msgstr "" msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_single_parent
msgid "Single parent"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "Single-parent"
msgstr ""
#. module: golem_family #. 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_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_golem_member_family_state_id

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com> # Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
@ -140,11 +141,10 @@ class GolemFamily(models.Model):
member_ids = fields.One2many('res.partner', 'family_id', 'Members', member_ids = fields.One2many('res.partner', 'family_id', 'Members',
domain=[('is_company', '=', False)]) domain=[('is_company', '=', False)])
single_parent = fields.Boolean()
note = fields.Text() note = fields.Text()
count = fields.Integer(compute='_compute_count', store=True) count = fields.Integer(compute='_compute_count', store=True)
single_parent = fields.Boolean()
@api.depends('member_ids') @api.depends('member_ids')
def _compute_count(self): def _compute_count(self):
for family in self: for family in self:

View File

@ -2,6 +2,7 @@
<!-- <!--
Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com> Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by it under the terms of the GNU Affero General Public License as published by
@ -34,10 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<label for="name" string="Family" class="oe_edit_only" /> <label for="name" string="Family" class="oe_edit_only" />
<field name="name" class="oe_inline" placeholder="Name" /> <field name="name" class="oe_inline" placeholder="Name" />
</h1> </h1>
<label for="single_parent" string="Single-Parent Family"/>
<field name="single_parent"/>
</div> </div>
</group> </group>
<group>
<field name="single_parent" />
</group>
<group string="Address"> <group string="Address">
<group> <group>
<field name="street" placeholder="Street..." /> <field name="street" placeholder="Street..." />
@ -189,8 +191,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="phone" /> <field name="phone" />
<field name="mobile" /> <field name="mobile" />
<field name="email" /> <field name="email" />
<filter name="single_parent" string="Single-parent Family" <filter name="single_parent" string="Single-parent"
domain="[('single_parent', '=', True)]"/> domain="[('single_parent', '=', True)]" />
<group string="Group By"> <group string="Group By">
<filter name="group_city" string="By city" <filter name="group_city" string="By city"
context="{'group_by': 'city'}"/> context="{'group_by': 'city'}"/>