diff --git a/partner_group/README.rst b/partner_group/README.rst new file mode 100644 index 000000000..14a96762e --- /dev/null +++ b/partner_group/README.rst @@ -0,0 +1,82 @@ +============= +Partner Group +============= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |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/11.0/partner_group + :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-11-0/partner-contact-11-0-partner_group + :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/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of partner to allow group partners into +other partners, this modulo not use the parent company field. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module you need to: + +#. Go to a *Partner*. +#. Set group field to other partner. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Sergio Teruel + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +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_group/__init__.py b/partner_group/__init__.py new file mode 100644 index 000000000..3275ac2ad --- /dev/null +++ b/partner_group/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import models diff --git a/partner_group/__manifest__.py b/partner_group/__manifest__.py new file mode 100644 index 000000000..112450272 --- /dev/null +++ b/partner_group/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + 'name': 'Partner Group', + 'summary': 'Group partners by groups (other partner)', + 'version': '11.0.1.0.0', + 'development_status': 'Beta', + 'category': 'Contact', + 'website': 'https://github.com/OCA/partner-contact', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'base', + ], + 'data': [ + 'views/res_partner_views.xml', + ], +} diff --git a/partner_group/i18n/es.po b/partner_group/i18n/es.po new file mode 100644 index 000000000..7eb61eecb --- /dev/null +++ b/partner_group/i18n/es.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_group +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-09-27 11:40+0000\n" +"PO-Revision-Date: 2018-09-27 13:41+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: \n" +"Language: es_ES\n" + +#. module: partner_group +#: model:ir.model,name:partner_group.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: partner_group +#: model:ir.model.fields,field_description:partner_group.field_res_partner_group_id +#: model:ir.model.fields,field_description:partner_group.field_res_users_group_id +#: model:ir.ui.view,arch_db:partner_group.view_res_partner_filter +msgid "Group" +msgstr "Grupo" diff --git a/partner_group/models/__init__.py b/partner_group/models/__init__.py new file mode 100644 index 000000000..3d2c983c6 --- /dev/null +++ b/partner_group/models/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import res_partner diff --git a/partner_group/models/res_partner.py b/partner_group/models/res_partner.py new file mode 100755 index 000000000..d2b41983f --- /dev/null +++ b/partner_group/models/res_partner.py @@ -0,0 +1,12 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + group_id = fields.Many2one( + comodel_name='res.partner', + string='Group', + ) diff --git a/partner_group/readme/CONTRIBUTORS.rst b/partner_group/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..f24a0b0dc --- /dev/null +++ b/partner_group/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sergio Teruel diff --git a/partner_group/readme/DESCRIPTION.rst b/partner_group/readme/DESCRIPTION.rst new file mode 100644 index 000000000..fc89def5b --- /dev/null +++ b/partner_group/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of partner to allow group partners into +other partners, this modulo not use the parent company field. diff --git a/partner_group/readme/USAGE.rst b/partner_group/readme/USAGE.rst new file mode 100644 index 000000000..293874937 --- /dev/null +++ b/partner_group/readme/USAGE.rst @@ -0,0 +1,4 @@ +To use this module you need to: + +#. Go to a *Partner*. +#. Set group field to other partner. diff --git a/partner_group/static/description/icon.png b/partner_group/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_group/static/description/icon.png differ diff --git a/partner_group/views/res_partner_views.xml b/partner_group/views/res_partner_views.xml new file mode 100755 index 000000000..ba4a775a4 --- /dev/null +++ b/partner_group/views/res_partner_views.xml @@ -0,0 +1,30 @@ + + + + + + Partner Group + res.partner + + + + + + + + + + res.partner + + + + + + + + + + + +