diff --git a/partner_affiliate/README.rst b/partner_affiliate/README.rst index c92ae1063..13ac24333 100644 --- a/partner_affiliate/README.rst +++ b/partner_affiliate/README.rst @@ -1,14 +1,38 @@ -.. 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 file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/12.0/partner_affiliate + :alt: OCA/partner-contact +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_affiliate + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/134/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + 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. +**Table of contents** + +.. contents:: + :local: + Usage ===== @@ -16,45 +40,57 @@ 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/11.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. +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 `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Camptocamp +* Tecnativa +* brain-tec AG +* Onestein Contributors ------------- +~~~~~~~~~~~~ * Yannick Vaucher * Vicent Cubells * Raul Martin * Dave Lasley +* Dennis Sluijk + +Other credits +~~~~~~~~~~~~~ -Maintainer ----------- +Images +------ + +* Odoo Community Association: `Icon `_. + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. 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. +This module is part of the `OCA/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_affiliate/__init__.py b/partner_affiliate/__init__.py index 5c3a084e0..69f7babdf 100644 --- a/partner_affiliate/__init__.py +++ b/partner_affiliate/__init__.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2012 Camptocamp SA - Yannick Vaucher -# Copyright 2018 brain-tec AG - Raul Martin # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/partner_affiliate/__manifest__.py b/partner_affiliate/__manifest__.py index b0cd62b50..b03a70ca9 100644 --- a/partner_affiliate/__manifest__.py +++ b/partner_affiliate/__manifest__.py @@ -1,17 +1,17 @@ -# -*- coding: utf-8 -*- # Copyright 2012 Camptocamp SA - Yannick Vaucher # Copyright 2017 Tecnativa - Vicent Cubells # Copyright 2018 brain-tec AG - Raul Martin # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Partner Affiliates', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': "Camptocamp, " "Tecnativa, " "brain-tec AG, " + "Onestein, " "Odoo Community Association (OCA)", - 'website': 'http://www.camptocamp.com', - 'category': 'CRM', + 'website': 'https://github.com/OCA/partner-contact', + 'category': 'Customer Relationship Management', 'license': 'AGPL-3', 'installable': True, 'depends': [ @@ -20,4 +20,5 @@ 'data': [ 'views/res_partner_view.xml', ], + 'development_status': 'Production/Stable', } diff --git a/partner_affiliate/models/__init__.py b/partner_affiliate/models/__init__.py index 67f136801..88fed2832 100644 --- a/partner_affiliate/models/__init__.py +++ b/partner_affiliate/models/__init__.py @@ -1,5 +1,3 @@ -# -*- 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/partner_affiliate/models/res_partner.py b/partner_affiliate/models/res_partner.py index 88d49ffa4..6fe47322e 100644 --- a/partner_affiliate/models/res_partner.py +++ b/partner_affiliate/models/res_partner.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2012 Camptocamp SA - Yannick Vaucher # Copyright 2018 brain-tec AG - Raul Martin # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -11,13 +10,13 @@ class ResPartner(models.Model): _inherit = "res.partner" # force "active_test" domain to bypass _search() override - child_ids = fields.One2many('res.partner', 'parent_id', - string='Contacts', - domain=[('active', '=', True), - ('is_company', '=', False)]) + child_ids = fields.One2many( + domain=[('active', '=', True), ('is_company', '=', False)] + ) # force "active_test" domain to bypass _search() override - affiliate_ids = fields.One2many('res.partner', 'parent_id', - string='Affiliates', - domain=[('active', '=', True), - ('is_company', '=', True)]) + affiliate_ids = fields.One2many( + 'res.partner', 'parent_id', + string='Affiliates', + domain=[('active', '=', True), ('is_company', '=', True)] + ) diff --git a/partner_affiliate/readme/CONTRIBUTORS.rst b/partner_affiliate/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..62e0d65d9 --- /dev/null +++ b/partner_affiliate/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Yannick Vaucher +* Vicent Cubells +* Raul Martin +* Dave Lasley +* Dennis Sluijk diff --git a/partner_affiliate/readme/CREDITS.rst b/partner_affiliate/readme/CREDITS.rst new file mode 100644 index 000000000..9baa7efb9 --- /dev/null +++ b/partner_affiliate/readme/CREDITS.rst @@ -0,0 +1,4 @@ +Images +------ + +* Odoo Community Association: `Icon `_. diff --git a/partner_affiliate/readme/DESCRIPTION.rst b/partner_affiliate/readme/DESCRIPTION.rst new file mode 100644 index 000000000..1df81c8cb --- /dev/null +++ b/partner_affiliate/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +The field 'Contacts & Addresses' is focused on storing contact information about the company's employees and the +company it self. +This module adds a new field 'Affiliates' on the partner form and changes 'Contacts & Addresses' +to only show individuals. This new field is in contrast to 'Contacts & Addresses' focussed on +storing information about holding companies and other company structures. \ No newline at end of file diff --git a/partner_affiliate/readme/USAGE.rst b/partner_affiliate/readme/USAGE.rst new file mode 100644 index 000000000..cf1474129 --- /dev/null +++ b/partner_affiliate/readme/USAGE.rst @@ -0,0 +1 @@ +You can find the new field on the partner (contact, customer, etc) form. \ No newline at end of file diff --git a/partner_affiliate/views/res_partner_view.xml b/partner_affiliate/views/res_partner_view.xml index 475888b07..cc4e37908 100644 --- a/partner_affiliate/views/res_partner_view.xml +++ b/partner_affiliate/views/res_partner_view.xml @@ -3,7 +3,6 @@ - res.partner.form res.partner @@ -15,7 +14,8 @@ - + + @@ -32,28 +32,33 @@ - + + + + + +