Browse Source

[11.0][ADD] partner_group: New module

pull/632/head
sergio.teruel 6 years ago
parent
commit
30bc497ee8
  1. 82
      partner_group/README.rst
  2. 2
      partner_group/__init__.py
  3. 20
      partner_group/__manifest__.py
  4. 30
      partner_group/i18n/es.po
  5. 2
      partner_group/models/__init__.py
  6. 12
      partner_group/models/res_partner.py
  7. 1
      partner_group/readme/CONTRIBUTORS.rst
  8. 2
      partner_group/readme/DESCRIPTION.rst
  9. 4
      partner_group/readme/USAGE.rst
  10. BIN
      partner_group/static/description/icon.png
  11. 30
      partner_group/views/res_partner_views.xml

82
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 <https://github.com/OCA/partner-contact/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 <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_group%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Tecnativa
Contributors
~~~~~~~~~~~~
* Sergio Teruel <sergio.teruel@tecnativa.com>
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 <https://github.com/OCA/partner-contact/tree/11.0/partner_group>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
partner_group/__init__.py

@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models

20
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',
],
}

30
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"

2
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

12
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',
)

1
partner_group/readme/CONTRIBUTORS.rst

@ -0,0 +1 @@
* Sergio Teruel <sergio.teruel@tecnativa.com>

2
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.

4
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.

BIN
partner_group/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

30
partner_group/views/res_partner_views.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Tecnativa - Sergio Teruel
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">Partner Group</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="lang" position="after">
<field name="group_id"/>
</field>
</field>
</record>
<record id="view_res_partner_filter" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<filter name="group_country" position="after">
<filter name="group_group" string="Group" context="{'group_by': 'group_id'}"/>
</filter>
<field name="parent_id" position="after">
<field name="group_id" operator="child_of"/>
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save