From 6f6751e1ce3464c3bc85c2032622f906f44b601d Mon Sep 17 00:00:00 2001 From: Fabien Bourgeois Date: Mon, 11 Jul 2016 20:13:34 +0200 Subject: [PATCH] [IMP]GOLEM Families : enhancements on res.partner and translations adapt --- golem_family/i18n/fr.po | 10 +++-- golem_family/i18n/golem_family.pot | 10 +++-- golem_family/models/golem_family.py | 9 ++++ golem_family/views/golem_member_view.xml | 18 ++++---- golem_family/views/res_partner_view.xml | 55 ++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 18 deletions(-) create mode 100644 golem_family/views/res_partner_view.xml diff --git a/golem_family/i18n/fr.po b/golem_family/i18n/fr.po index 50f49ac..c8b51e7 100644 --- a/golem_family/i18n/fr.po +++ b/golem_family/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-08 19:50+0000\n" -"PO-Revision-Date: 2016-07-08 19:50+0000\n" +"POT-Creation-Date: 2016-07-11 18:06+0000\n" +"PO-Revision-Date: 2016-07-11 18:06+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -105,7 +105,8 @@ msgid "Family Count" msgstr "Somme des membres de la famille" #. module: golem_family -#: code:addons/golem_family/models/golem_family.py:37 +#: code:addons/golem_family/models/golem_family.py:33 +#: code:addons/golem_family/models/golem_family.py:46 #, python-format msgid "Family Members" msgstr "Membres de la famille" @@ -314,7 +315,8 @@ msgid "e.g. www.odoo.com" msgstr "par exemple www.yaltik.com" #. module: golem_family -#: view:golem.member:golem_family.family_smartbtn_add +#: view:golem.member:golem_family.golem_member_family_smartbtn_add +#: view:res.partner:golem_family.res_partner_family_smartbtn_add msgid "family members" msgstr "famille" diff --git a/golem_family/i18n/golem_family.pot b/golem_family/i18n/golem_family.pot index 9f43e23..8782e9c 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 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-08 19:50+0000\n" -"PO-Revision-Date: 2016-07-08 19:50+0000\n" +"POT-Creation-Date: 2016-07-11 18:06+0000\n" +"PO-Revision-Date: 2016-07-11 18:06+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -104,7 +104,8 @@ msgid "Family Count" msgstr "" #. module: golem_family -#: code:addons/golem_family/models/golem_family.py:37 +#: code:addons/golem_family/models/golem_family.py:33 +#: code:addons/golem_family/models/golem_family.py:46 #, python-format msgid "Family Members" msgstr "" @@ -313,7 +314,8 @@ msgid "e.g. www.odoo.com" msgstr "" #. module: golem_family -#: view:golem.member:golem_family.family_smartbtn_add +#: view:golem.member:golem_family.golem_member_family_smartbtn_add +#: view:res.partner:golem_family.res_partner_family_smartbtn_add msgid "family members" msgstr "" diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index edca00d..0a0218c 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -27,6 +27,15 @@ class ResPartner(models.Model): string='Role', index=True) family_count = fields.Integer('Family Count', related='family_id.count') + @api.multi + def button_family_members(self): + self.ensure_one() + return {'name': _('Family Members'), + 'type': 'ir.actions.act_window', + 'res_model': 'golem.family', + 'view_mode': 'form', + 'res_id': self.family_id.id} + class GolemMember(models.Model): _inherit = 'golem.member' diff --git a/golem_family/views/golem_member_view.xml b/golem_family/views/golem_member_view.xml index 0b344b2..689848a 100644 --- a/golem_family/views/golem_member_view.xml +++ b/golem_family/views/golem_member_view.xml @@ -20,20 +20,18 @@ along with this program. If not, see . - + Add family management smart button golem.member -
-
- -
+
+
diff --git a/golem_family/views/res_partner_view.xml b/golem_family/views/res_partner_view.xml new file mode 100644 index 0000000..02c1c16 --- /dev/null +++ b/golem_family/views/res_partner_view.xml @@ -0,0 +1,55 @@ + + + + + + + + + Add family management smart button + res.partner + + +
+ +
+
+
+ + + Add family role into res.partner form + res.partner + + + + + + + + + +
+