Browse Source

[ADD] partner_brand (#754)

12.0
Maxime Chambreuil 5 years ago
committed by OCA-git-bot
parent
commit
389c77bac0
  1. 21
      partner_brand/README.rst
  2. 4
      partner_brand/__init__.py
  3. 24
      partner_brand/__manifest__.py
  4. 4
      partner_brand/models/__init__.py
  5. 10
      partner_brand/models/res_partner.py
  6. 3
      partner_brand/readme/CONTRIBUTORS.rst
  7. 1
      partner_brand/readme/CREDITS.rst
  8. 4
      partner_brand/readme/DESCRIPTION.rst
  9. 5
      partner_brand/readme/USAGE.rst
  10. BIN
      partner_brand/static/description/icon.png
  11. 18
      partner_brand/views/res_partner_views.xml

21
partner_brand/README.rst

@ -0,0 +1,21 @@
**This file is going to be generated by oca-gen-addon-readme.**
*Manual changes will be overwritten.*
Please provide content in the ``readme`` directory:
* **DESCRIPTION.rst** (required)
* INSTALL.rst (optional)
* CONFIGURE.rst (optional)
* **USAGE.rst** (optional, highly recommended)
* DEVELOP.rst (optional)
* ROADMAP.rst (optional)
* HISTORY.rst (optional, recommended)
* **CONTRIBUTORS.rst** (optional, highly recommended)
* CREDITS.rst (optional)
Content of this README will also be drawn from the addon manifest,
from keys such as name, authors, maintainers, development_status,
and license.
A good, one sentence summary in the manifest is also highly recommended.

4
partner_brand/__init__.py

@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models

24
partner_brand/__manifest__.py

@ -0,0 +1,24 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Partner Brand",
"summary": "Manage your brands",
"version": "12.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-workflow",
"author": [
"Open Source Integrators, ",
"Odoo Community Association (OCA)",
],
"license": "AGPL-3",
"depends": [
"contacts",
],
"data": [
"views/res_partner_views.xml",
],
"installable": True,
"development_status": "Beta",
"maintainers": ["osi-scampbell"],
}

4
partner_brand/models/__init__.py

@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import res_partner

10
partner_brand/models/res_partner.py

@ -0,0 +1,10 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Partner(models.Model):
_inherit = 'res.partner'
type = fields.Selection(selection_add=[('brand', 'Brand')])

3
partner_brand/readme/CONTRIBUTORS.rst

@ -0,0 +1,3 @@
* Raphael Lee <rlee@opensourceintegrators.com>
* Steve Campbell <scampbell@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>

1
partner_brand/readme/CREDITS.rst

@ -0,0 +1 @@
* Open Source Integrators <https://www.opensourceintegrators.com>

4
partner_brand/readme/DESCRIPTION.rst

@ -0,0 +1,4 @@
This module allows you to manage your brand with a different address, logo,
email, website, etc.
It adds a new type of address/contact and a filter to easily find them.

5
partner_brand/readme/USAGE.rst

@ -0,0 +1,5 @@
To use this module, you need to:
#. Go to the partner form
#. Select a company
#. Add a new address and select the type "Brand"

BIN
partner_brand/static/description/icon.png

After

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

18
partner_brand/views/res_partner_views.xml

@ -0,0 +1,18 @@
<odoo>
<!-- Copyright (C) 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<record id="filter_res_partner_brand" model="ir.ui.view">
<field name="name">filter.res.partner.brand</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<filter name="type_company" position="after">
<filter name="is_brand" string="Brands"
domain="[('type', '=', 'brand')]"/>
</filter>
</field>
</record>
</odoo>
Loading…
Cancel
Save