[ADD]GOLEM Family : add member family names and search on it
This commit is contained in:
parent
301f88f537
commit
c441499d9d
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2016-2020 Fabien Bourgeois <fabien@yaltik.com>
|
# Copyright 2016-2021 Fabien Bourgeois <fabien@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
|
||||||
@ -19,7 +19,7 @@
|
|||||||
'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.5.1',
|
'version': '10.0.2.6.0',
|
||||||
'category': 'GOLEM',
|
'category': 'GOLEM',
|
||||||
'author': 'Fabien Bourgeois, Youssef El Ouahby',
|
'author': 'Fabien Bourgeois, Youssef El Ouahby',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
|
@ -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-10-26 15:44+0000\n"
|
"POT-Creation-Date: 2021-01-14 14:45+0000\n"
|
||||||
"PO-Revision-Date: 2018-10-26 17:45+0200\n"
|
"PO-Revision-Date: 2021-01-14 15:45+0100\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -170,8 +170,8 @@ msgid "Family"
|
|||||||
msgstr "Famille"
|
msgstr "Famille"
|
||||||
|
|
||||||
#. module: golem_family
|
#. module: golem_family
|
||||||
#: code:addons/golem_family/models/golem_family.py:49
|
#: code:addons/golem_family/models/golem_family.py:59
|
||||||
#: code:addons/golem_family/models/golem_family.py:83
|
#: code:addons/golem_family/models/golem_family.py:93
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Family Members"
|
msgid "Family Members"
|
||||||
msgstr "Membres de la famille"
|
msgstr "Membres de la famille"
|
||||||
@ -181,6 +181,13 @@ msgstr "Membres de la famille"
|
|||||||
msgid "Family form"
|
msgid "Family form"
|
||||||
msgstr "Fiche Famille"
|
msgstr "Fiche Famille"
|
||||||
|
|
||||||
|
#. module: golem_family
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member_names
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_names
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_names
|
||||||
|
msgid "Family member names"
|
||||||
|
msgstr "Noms des membres de la famille"
|
||||||
|
|
||||||
#. module: golem_family
|
#. module: golem_family
|
||||||
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
|
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
|
||||||
msgid "Family members"
|
msgid "Family members"
|
||||||
|
@ -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-10-26 15:44+0000\n"
|
"POT-Creation-Date: 2021-01-14 14:45+0000\n"
|
||||||
"PO-Revision-Date: 2018-10-26 15:44+0000\n"
|
"PO-Revision-Date: 2021-01-14 14:45+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -170,8 +170,8 @@ msgid "Family"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_family
|
#. module: golem_family
|
||||||
#: code:addons/golem_family/models/golem_family.py:49
|
#: code:addons/golem_family/models/golem_family.py:59
|
||||||
#: code:addons/golem_family/models/golem_family.py:83
|
#: code:addons/golem_family/models/golem_family.py:93
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Family Members"
|
msgid "Family Members"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -181,6 +181,13 @@ msgstr ""
|
|||||||
msgid "Family form"
|
msgid "Family form"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_family
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member_names
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_names
|
||||||
|
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_names
|
||||||
|
msgid "Family member names"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_family
|
#. module: golem_family
|
||||||
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
|
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
|
||||||
msgid "Family members"
|
msgid "Family members"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
|
# Copyright 2017-2021 Fabien Bourgeois <fabien@yaltik.com>
|
||||||
# Copyright 2018 Youssef El Ouahby <youssef@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
|
||||||
@ -42,6 +42,16 @@ class ResPartner(models.Model):
|
|||||||
index=True)
|
index=True)
|
||||||
family_count = fields.Integer(related='family_id.count')
|
family_count = fields.Integer(related='family_id.count')
|
||||||
|
|
||||||
|
family_member_names = fields.Char(compute='_compute_family_member_names',
|
||||||
|
index=True, store=True)
|
||||||
|
|
||||||
|
@api.depends('family_id', 'family_id.member_ids')
|
||||||
|
def _compute_family_member_names(self):
|
||||||
|
""" Computes family member names, for search """
|
||||||
|
for member in self:
|
||||||
|
if member.family_id:
|
||||||
|
member.family_member_names = u', '.join(member.family_id.member_ids.mapped('name'))
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def button_family_members(self):
|
def button_family_members(self):
|
||||||
""" Go to family view, from partner """
|
""" Go to family view, from partner """
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
|
Copyright 2017-2021 Fabien Bourgeois <fabien@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
|
||||||
@ -92,6 +92,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="name" position="after">
|
<field name="name" position="after">
|
||||||
<field name="family_id" />
|
<field name="family_id" />
|
||||||
|
<field name="family_member_names" />
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user