From 5ee898785a0e06640dee43d234d36b18ff59e7e7 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 8 Nov 2015 15:46:45 -0500 Subject: [PATCH 1/2] OCA Transbot updated translations from Transifex --- res_partner_affiliate/i18n/de.po | 13 +++++---- res_partner_affiliate/i18n/es.po | 9 +++--- res_partner_affiliate/i18n/fi.po | 50 ++++++++++++++++++++++++++++++++ res_partner_affiliate/i18n/it.po | 50 ++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 res_partner_affiliate/i18n/fi.po create mode 100644 res_partner_affiliate/i18n/it.po diff --git a/res_partner_affiliate/i18n/de.po b/res_partner_affiliate/i18n/de.po index 7d9fe27b7..63090fb2e 100644 --- a/res_partner_affiliate/i18n/de.po +++ b/res_partner_affiliate/i18n/de.po @@ -3,13 +3,14 @@ # * res_partner_affiliate # # Translators: +# Rudolf Schnapka , 2016 msgid "" msgstr "" "Project-Id-Version: partner-contact (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-28 15:54+0000\n" -"PO-Revision-Date: 2015-05-22 13:07+0000\n" -"Last-Translator: Maxime Chambreuil \n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" +"PO-Revision-Date: 2016-01-18 08:09+0000\n" +"Last-Translator: Rudolf Schnapka \n" "Language-Team: German (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -26,12 +27,12 @@ msgstr "Tochtergesellschaften" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate msgid "Contacts" -msgstr "" +msgstr "Kontakte" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate msgid "Fax:" -msgstr "" +msgstr "Fax:" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate @@ -41,7 +42,7 @@ msgstr "Mobil:" #. module: res_partner_affiliate #: model:ir.model,name:res_partner_affiliate.model_res_partner msgid "Partner" -msgstr "" +msgstr "Partner" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate diff --git a/res_partner_affiliate/i18n/es.po b/res_partner_affiliate/i18n/es.po index 9826431de..664e0e5e9 100644 --- a/res_partner_affiliate/i18n/es.po +++ b/res_partner_affiliate/i18n/es.po @@ -3,13 +3,14 @@ # * res_partner_affiliate # # Translators: +# Antonio Trueba, 2016 msgid "" msgstr "" "Project-Id-Version: partner-contact (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-28 15:54+0000\n" -"PO-Revision-Date: 2015-05-22 13:07+0000\n" -"Last-Translator: Maxime Chambreuil \n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" +"PO-Revision-Date: 2016-01-16 15:06+0000\n" +"Last-Translator: Antonio Trueba\n" "Language-Team: Spanish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -26,7 +27,7 @@ msgstr "Filiales" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate msgid "Contacts" -msgstr "" +msgstr "Contactos" #. module: res_partner_affiliate #: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate diff --git a/res_partner_affiliate/i18n/fi.po b/res_partner_affiliate/i18n/fi.po new file mode 100644 index 000000000..f6b48e064 --- /dev/null +++ b/res_partner_affiliate/i18n/fi.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * res_partner_affiliate +# +# Translators: +# Jarmo Kortetjärvi , 2016 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" +"PO-Revision-Date: 2016-01-27 20:34+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +#: field:res.partner,affiliate_ids:0 +msgid "Affiliates" +msgstr "Yhteistyökumppanit" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Contacts" +msgstr "Kontaktit" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Fax:" +msgstr "Faksi:" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Mobile:" +msgstr "Kännykkä:" + +#. module: res_partner_affiliate +#: model:ir.model,name:res_partner_affiliate.model_res_partner +msgid "Partner" +msgstr "Kumppani" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Phone:" +msgstr "Puhelin:" diff --git a/res_partner_affiliate/i18n/it.po b/res_partner_affiliate/i18n/it.po new file mode 100644 index 000000000..c7a6f0259 --- /dev/null +++ b/res_partner_affiliate/i18n/it.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * res_partner_affiliate +# +# Translators: +# Paolo Valier, 2016 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-13 00:57+0000\n" +"PO-Revision-Date: 2016-03-13 13:09+0000\n" +"Last-Translator: Paolo Valier\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +#: field:res.partner,affiliate_ids:0 +msgid "Affiliates" +msgstr "Affiliati" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Contacts" +msgstr "Contatti" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Fax:" +msgstr "Fax:" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Mobile:" +msgstr "Cellulare:" + +#. module: res_partner_affiliate +#: model:ir.model,name:res_partner_affiliate.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: res_partner_affiliate +#: view:res.partner:res_partner_affiliate.view_partner_form_add_affiliate +msgid "Phone:" +msgstr "" From 7fd5797267e49d15c730ca200581fca22d38deaa Mon Sep 17 00:00:00 2001 From: cubells Date: Tue, 10 Jan 2017 21:01:56 +0100 Subject: [PATCH 2/2] [9.0][MIG] res_partner_affiliate module - Updated views - Created README - Updated file structure --- res_partner_affiliate/README.rst | 58 ++++++++++++ res_partner_affiliate/__init__.py | 23 +---- res_partner_affiliate/__openerp__.py | 45 +++------ res_partner_affiliate/models/__init__.py | 5 + res_partner_affiliate/models/res_partner.py | 18 ++++ res_partner_affiliate/res_partner.py | 39 -------- res_partner_affiliate/res_partner_view.xml | 92 ------------------- .../views/res_partner_view.xml | 79 ++++++++++++++++ 8 files changed, 176 insertions(+), 183 deletions(-) create mode 100644 res_partner_affiliate/README.rst create mode 100644 res_partner_affiliate/models/__init__.py create mode 100644 res_partner_affiliate/models/res_partner.py delete mode 100644 res_partner_affiliate/res_partner.py delete mode 100644 res_partner_affiliate/res_partner_view.xml create mode 100644 res_partner_affiliate/views/res_partner_view.xml diff --git a/res_partner_affiliate/README.rst b/res_partner_affiliate/README.rst new file mode 100644 index 000000000..948a00759 --- /dev/null +++ b/res_partner_affiliate/README.rst @@ -0,0 +1,58 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================== +Partner Affiliates +================== + +This module allows to use parent_id in company partner to refer to a parent +company, plus will show a tab in parent company of affiliated companies. + +Usage +===== + +New tab 'Affiliates' are available on the contact form if partner is company. +In tab 'Contact & Addresses' only are shown those contacts that are not +companies. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/134/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Yannick Vaucher +* Vicent Cubells + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/res_partner_affiliate/__init__.py b/res_partner_affiliate/__init__.py index 3cd8dd337..c20444aba 100644 --- a/res_partner_affiliate/__init__.py +++ b/res_partner_affiliate/__init__.py @@ -1,22 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Yannick Vaucher -# Copyright 2012 Camptocamp SA -# -# 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 the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# Copyright 2012 Camptocamp SA - Yannick Vaucher +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import res_partner +from . import models diff --git a/res_partner_affiliate/__openerp__.py b/res_partner_affiliate/__openerp__.py index 718fb73ce..ac4e0e524 100644 --- a/res_partner_affiliate/__openerp__.py +++ b/res_partner_affiliate/__openerp__.py @@ -1,40 +1,21 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Yannick Vaucher -# Copyright 2012 Camptocamp SA -# -# 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 the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# Copyright 2012 Camptocamp SA - Yannick Vaucher +# Copyright 2017 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Partner Affiliates', - 'version': '8.0.1.0.0', - 'author': "Camptocamp,Odoo Community Association (OCA)", - 'maintainer': 'Camptocamp', + 'version': '9.0.1.0.0', + 'author': "Camptocamp, " + "Tecnativa, " + "Odoo Community Association (OCA)", + 'website': 'http://www.camptocamp.com', 'category': 'CRM', 'license': 'AGPL-3', - 'depends': ['base'], - 'description': """ - Allows to use parent_id in company partner to refer to a parent company - Plus will show a tab in parent company of affiliated companies""", - 'website': 'http://www.camptocamp.com', + 'installable': True, + 'depends': [ + 'base' + ], 'data': [ - 'res_partner_view.xml', + 'views/res_partner_view.xml', ], - 'demo': [], - 'installable': False, - 'auto_install': False, - 'application': True } diff --git a/res_partner_affiliate/models/__init__.py b/res_partner_affiliate/models/__init__.py new file mode 100644 index 000000000..67f136801 --- /dev/null +++ b/res_partner_affiliate/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright 2012 Camptocamp SA - Yannick Vaucher +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import res_partner diff --git a/res_partner_affiliate/models/res_partner.py b/res_partner_affiliate/models/res_partner.py new file mode 100644 index 000000000..8a33e85b1 --- /dev/null +++ b/res_partner_affiliate/models/res_partner.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2012 Camptocamp SA - Yannick Vaucher +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import fields, models + + +class ResPartner(models.Model): + """Add relation affiliate_ids.""" + _inherit = "res.partner" + + child_ids = fields.One2many(domain=[('is_company', '=', False)]) + affiliate_ids = fields.One2many( + comodel_name='res.partner', + inverse_name='parent_id', + string='Affiliates', + domain=[('is_company', '=', True)], + ) diff --git a/res_partner_affiliate/res_partner.py b/res_partner_affiliate/res_partner.py deleted file mode 100644 index 259c86e46..000000000 --- a/res_partner_affiliate/res_partner.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Yannick Vaucher -# Copyright 2012 Camptocamp SA -# -# 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 the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class ResPartner(orm.Model): - """ - Add relation affiliate_ids - """ - _name = "res.partner" - _inherit = "res.partner" - - _columns = { - 'child_ids': fields.one2many( - 'res.partner', 'parent_id', - 'Contacts', domain=[('is_company', '=', False)]), - 'affiliate_ids': fields.one2many( - 'res.partner', 'parent_id', - 'Affiliates', domain=[('is_company', '=', True)]), - } diff --git a/res_partner_affiliate/res_partner_view.xml b/res_partner_affiliate/res_partner_view.xml deleted file mode 100644 index 837a99094..000000000 --- a/res_partner_affiliate/res_partner_view.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - res.partner.form - res.partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- X -
- - - - - - - - - - - - - - - - -
-
- - - - -
-

-
-
- -
Phone:
-
Mobile:
-
Fax:
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
diff --git a/res_partner_affiliate/views/res_partner_view.xml b/res_partner_affiliate/views/res_partner_view.xml new file mode 100644 index 000000000..95fc56c80 --- /dev/null +++ b/res_partner_affiliate/views/res_partner_view.xml @@ -0,0 +1,79 @@ + + + + + + res.partner.form + res.partner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +