Browse Source

commit inicial

Rodney Enciso Arias 8 years ago
commit
06143923e2
13 changed files with 826 additions and 0 deletions
  1. 74 0
      README.rst
  2. 31 0
      __init__.py
  3. BIN
      __init__.pyc
  4. 45 0
      __openerp__.py
  5. 117 0
      i18n/es_PY.po
  6. 82 0
      i18n/fr.po
  7. 82 0
      i18n/fr_FR.po
  8. 82 0
      i18n/product_brand.pot
  9. 71 0
      product_brand.py
  10. BIN
      product_brand.pyc
  11. 239 0
      product_brand_view.xml
  12. 3 0
      security/ir.model.access.csv
  13. BIN
      static/description/icon.png

+ 74 - 0
README.rst

@@ -0,0 +1,74 @@
+Product Brand Manager [product_brand]
+=====================================
+
+This module allows odoo users to easily manage product brands. You can
+define brands, attach a logo and a description to them. 
+It also allows to attach a partner to a brand.
+
+Installation
+============
+
+To install this module, you need to:
+
+ * git clone https://github.com/OCA/product_attribute --branch 8.0
+ * make it available to odoo by adding its location to the addons_path in 
+   /etc/odoo-server.conf
+
+Configuration
+=============
+
+To configure this module, you need to:
+
+ * no configuration required
+
+Usage
+=====
+
+To use this module, you need to:
+
+ * go to ...
+
+For further information, please visit:
+
+ * https://www.odoo.com/forum/help-1
+
+Known issues / Roadmap
+======================
+
+* add a field with brands assiciated to a Customer or Supplier on 
+  the Customers/Suppliers Form View
+
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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
+`here <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_brand%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
+
+
+Credits
+=======
+
+Contributors
+------------
+
+* Mathieu Lemercier <mathieu@netandco.net>
+* Franck Bret <franck@netandco.net>
+* Seraphine Lantible <s.lantible@gmail.com>
+* Gunnar Wagner <vrms@netcologne.de>
+* Leonardo Donelli <donelli@webmonks.it>
+
+Maintainer
+----------
+
+.. image:: http://odoo-community.org/logo.png
+   :alt: Odoo Community Association
+   :target: http://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 http://odoo-community.org.

+ 31 - 0
__init__.py

@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+###############################################################################
+# #                                                                           #
+# product_brand for Odoo #                                                    #
+# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). #                  #
+# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> #  #
+# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com> #   #
+# Contributors                                                                #
+# Mathieu Lemercier, mathieu@netandco.net, #                                  #
+# Franck Bret, franck@netandco.net #                                          #
+# Seraphine Lantible, s.lantible@gmail.com, http://www.prisnet.ch             #
+# #                                                                           #
+# 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 <http://www.gnu.org/licenses/>. #      #
+# #                                                                           #
+###############################################################################
+###############################################################################
+# Product Brand is an Openobject module wich enable Brand management          #
+# for products                                                                #
+###############################################################################
+from . import product_brand

BIN
__init__.pyc


+ 45 - 0
__openerp__.py

@@ -0,0 +1,45 @@
+# -*- encoding: utf-8 -*-
+###############################################################################
+# #                                                                           #
+# product_brand for Odoo #                                                    #
+# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). #                  #
+# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> #  #
+# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com> #   #
+# Contributors                                                                #
+# Mathieu Lemercier, mathieu@netandco.net, #                                  #
+# Franck Bret, franck@netandco.net #                                          #
+# Seraphine Lantible, s.lantible@gmail.com, http://www.prisnet.ch             #
+# #                                                                           #
+# 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 <http://www.gnu.org/licenses/>. #      #
+# #                                                                           #
+###############################################################################
+###############################################################################
+# Product Brand is an Openobject module wich enable Brand management for      #
+# products                                                                    #
+###############################################################################
+{
+    'name': 'Product Brand Manager',
+    'version': '8.0.0.1.0',
+    'category': 'Product',
+    'summary': 'Add brand to products',
+    'author': 'NetAndCo, Akretion, Prisnet Telecommunications SA'
+              ', MONK Software, Odoo Community Association (OCA)',
+    'license': 'AGPL-3',
+    'depends': ['product'],
+    'data': [
+        'product_brand_view.xml',
+        'security/ir.model.access.csv'
+    ],
+    'installable': True,
+}

+ 117 - 0
i18n/es_PY.po

@@ -0,0 +1,117 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#	* product_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 9.0alpha1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-09-22 12:22+0000\n"
+"PO-Revision-Date: 2014-09-22 12:22+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: product_brand
+#: model:ir.actions.act_window,name:product_brand.action_product_brand
+#: view:product.template:0
+#: field:product.template,product_brand_id:0
+msgid "Brand"
+msgstr "Marca"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,name:0
+msgid "Brand Name"
+msgstr "Marca"
+
+#. module: product_brand
+#: model:ir.ui.menu,name:product_brand.menu_product_brand
+msgid "Brand management"
+msgstr "Gestión de marcas"
+
+#. module: product_brand
+#: field:product.brand,create_uid:0
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: product_brand
+#: field:product.brand,create_date:0
+msgid "Created on"
+msgstr "Creado en"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,description:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: product_brand
+#: view:product.template:0
+msgid "Group by..."
+msgstr "Agrupado por..."
+
+#. module: product_brand
+#: field:product.brand,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: product_brand
+#: field:product.brand,write_uid:0
+msgid "Last Updated by"
+msgstr "Última actualización por"
+
+#. module: product_brand
+#: field:product.brand,write_date:0
+msgid "Last Updated on"
+msgstr "Última actualización en"
+
+#. module: product_brand
+#: field:product.brand,logo:0
+msgid "Logo File"
+msgstr "Archivo del logo"
+
+#. module: product_brand
+#: view:product.brand:0
+msgid "Product Brand"
+msgstr "Marca del Producto"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_template
+msgid "Product Template"
+msgstr "Plantilla de producto"
+
+#. module: product_brand
+#: field:product.brand,reference:0
+msgid "Reference"
+msgstr "Referencia"
+
+#. module: product_brand
+#: help:product.brand,reference:0
+msgid "Reference for the product internal reference.Up to 3 character lenght.E.g.: for Nike could be NK"
+msgstr "Referencia de la marca para la referencia interna del producto. Hasta 3 caracteres. Ejemplo: para Nike podría ser NK"
+
+#. module: product_brand
+#: help:product.template,product_brand_id:0
+msgid "Select a brand for this product."
+msgstr "Seleccione una marca para este producto"
+
+#. module: product_brand
+#: help:product.brand,partner_id:0
+msgid "Select a partner for this brand if it exists."
+msgstr "Seleccione una empresa para esta marca si existe"
+
+#. module: product_brand
+#: field:product.brand,partner_id:0
+msgid "partner"
+msgstr "Compañía"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_brand
+#: view:product.brand:0
+msgid "product.brand"
+msgstr "product.brand"
+

+ 82 - 0
i18n/fr.po

@@ -0,0 +1,82 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-03-14 12:55+0000\n"
+"PO-Revision-Date: 2014-04-08 17:33+0000\n"
+"Last-Translator: Guewen Baconnier @ Camptocamp <Unknown>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-05-17 07:08+0000\n"
+"X-Generator: Launchpad (build 17007)\n"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_brand
+#: view:product.brand:0
+msgid "product.brand"
+msgstr "product.brand"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_template
+msgid "Product Template"
+msgstr "Modèle de produit"
+
+#. module: product_brand
+#: model:ir.ui.menu,name:product_brand.menu_product_brand
+msgid "Brand management"
+msgstr "Gestion des marques"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,description:0
+msgid "Description"
+msgstr "Description"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,name:0
+msgid "Brand Name"
+msgstr "Marque"
+
+#. module: product_brand
+#: view:product.brand:0
+msgid "Product Brand"
+msgstr "Marque d'article"
+
+#. module: product_brand
+#: field:product.brand,logo:0
+msgid "Logo File"
+msgstr "Logo"
+
+#. module: product_brand
+#: model:ir.actions.act_window,name:product_brand.action_product_brand
+#: view:product.product:0
+#: field:product.template,product_brand_id:0
+msgid "Brand"
+msgstr "Marque"
+
+#. module: product_brand
+#: help:product.brand,partner_id:0
+msgid "Select a partner for this brand if it exists."
+msgstr "Sélectionnez un partenaire pour cette marque."
+
+#. module: product_brand
+#: view:product.product:0
+msgid "Group by..."
+msgstr "Regrouper par..."
+
+#. module: product_brand
+#: field:product.brand,partner_id:0
+msgid "partner"
+msgstr "Partenaire"
+
+#. module: product_brand
+#: help:product.template,product_brand_id:0
+msgid "Select a brand for this product."
+msgstr "Sélectionnez une marque pour ce produit."

+ 82 - 0
i18n/fr_FR.po

@@ -0,0 +1,82 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.7\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2014-03-14 12:55+0000\n"
+"PO-Revision-Date: 2014-03-11 12:42+0000\n"
+"Last-Translator: Graeme Gellatly <Unknown>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-05-17 07:08+0000\n"
+"X-Generator: Launchpad (build 17007)\n"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_brand
+#: view:product.brand:0
+msgid "product.brand"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.ui.menu,name:product_brand.menu_product_brand
+msgid "Brand management"
+msgstr "Gestion des marques"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,description:0
+msgid "Description"
+msgstr "Description"
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,name:0
+msgid "Brand Name"
+msgstr "Marque"
+
+#. module: product_brand
+#: view:product.brand:0
+msgid "Product Brand"
+msgstr ""
+
+#. module: product_brand
+#: field:product.brand,logo:0
+msgid "Logo File"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.actions.act_window,name:product_brand.action_product_brand
+#: view:product.product:0
+#: field:product.template,product_brand_id:0
+msgid "Brand"
+msgstr "Marque"
+
+#. module: product_brand
+#: help:product.brand,partner_id:0
+msgid "Select a partner for this brand if it exists."
+msgstr ""
+
+#. module: product_brand
+#: view:product.product:0
+msgid "Group by..."
+msgstr ""
+
+#. module: product_brand
+#: field:product.brand,partner_id:0
+msgid "partner"
+msgstr "Partenaire"
+
+#. module: product_brand
+#: help:product.template,product_brand_id:0
+msgid "Select a brand for this product."
+msgstr ""

+ 82 - 0
i18n/product_brand.pot

@@ -0,0 +1,82 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-03-14 12:55+0000\n"
+"PO-Revision-Date: 2014-03-14 12:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_brand
+#: view:product.brand:0
+msgid "product.brand"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.model,name:product_brand.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.ui.menu,name:product_brand.menu_product_brand
+msgid "Brand management"
+msgstr ""
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,description:0
+msgid "Description"
+msgstr ""
+
+#. module: product_brand
+#: view:product.brand:0
+#: field:product.brand,name:0
+msgid "Brand Name"
+msgstr ""
+
+#. module: product_brand
+#: view:product.brand:0
+msgid "Product Brand"
+msgstr ""
+
+#. module: product_brand
+#: field:product.brand,logo:0
+msgid "Logo File"
+msgstr ""
+
+#. module: product_brand
+#: model:ir.actions.act_window,name:product_brand.action_product_brand
+#: view:product.product:0
+#: field:product.template,product_brand_id:0
+msgid "Brand"
+msgstr ""
+
+#. module: product_brand
+#: help:product.brand,partner_id:0
+msgid "Select a partner for this brand if it exists."
+msgstr ""
+
+#. module: product_brand
+#: view:product.product:0
+msgid "Group by..."
+msgstr ""
+
+#. module: product_brand
+#: field:product.brand,partner_id:0
+msgid "partner"
+msgstr ""
+
+#. module: product_brand
+#: help:product.template,product_brand_id:0
+msgid "Select a brand for this product."
+msgstr ""
+

+ 71 - 0
product_brand.py

@@ -0,0 +1,71 @@
+# -*- encoding: utf-8 -*-
+###############################################################################
+#                                                                             #
+# product_brand for Odoo                                                      #
+# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>).                    #
+# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>    #
+# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com>     #
+# Copyright (C) 2015 Leonardo Donelli                                         #
+# Contributors                                                                #
+# Mathieu Lemercier, mathieu@netandco.net                                     #
+# Franck Bret, franck@netandco.net                                            #
+# Seraphine Lantible, s.lantible@gmail.com, http://www.prisnet.ch             #
+# Leonardo Donelli, donelli@webmonks.it, http://www.wearemonk.com             #
+#                                                                             #
+# 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 <http://www.gnu.org/licenses/>.        #
+#                                                                             #
+###############################################################################
+###############################################################################
+# Product Brand is an Openobject module wich enable Brand management for      #
+# products                                                                    #
+###############################################################################
+from openerp import models, fields, api
+
+
+class ProductBrand(models.Model):
+    _name = 'product.brand'
+
+    name = fields.Char('Brand Name', required=True)
+    description = fields.Text('Description', translate=True)
+    partner_id = fields.Many2one(
+        'res.partner',
+        string='Partner',
+        help='Select a partner for this brand if it exists',
+        ondelete='restrict'
+    )
+    logo = fields.Binary('Logo File')
+    product_ids = fields.One2many(
+        'product.template',
+        'product_brand_id',
+        string='Brand Products',
+    )
+    products_count = fields.Integer(
+        string='Number of products',
+        compute='_get_products_count',
+    )
+
+    @api.one
+    @api.depends('product_ids')
+    def _get_products_count(self):
+        self.products_count = len(self.product_ids)
+
+
+class ProductTemplate(models.Model):
+    _inherit = 'product.template'
+
+    product_brand_id = fields.Many2one(
+        'product.brand',
+        string='Brand',
+        help='Select a brand for this product'
+    )

BIN
product_brand.pyc


+ 239 - 0
product_brand_view.xml

@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  product_brand for Odoo
+  Copyright (C) 2009 NetAndCo <http://www.netandco.net>.
+  Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>
+  Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com>
+  Copyright (C) 2015 Leonardo Donelli <http://www.wearemonk.com>
+  Contributors:
+  Mathieu Lemercier <mathieu@netandco.net>
+  Franck Bret <franck@netandco.net>
+  Seraphine Lantible <s.lantible@gmail.com>
+  Leonardo Donelli <donelli@webmonks.it>
+-->
+<openerp>
+    <data>
+        <record id="product_brand_search_form_view" model="ir.ui.view">
+            <field name="name">product.brand.search.form</field>
+            <field name="model">product.brand</field>
+            <field name="arch" type="xml">
+                <search string="Product Brand">
+                    <field name="name"/>
+                    <field name="partner_id"/>
+                </search>
+            </field>
+        </record>
+
+        <act_window
+            id="action_open_brand_products"
+            name="Brand Products"
+            res_model="product.template"
+            view_type="form"
+            view_mode="kanban,form,tree"
+            domain="[('product_brand_id', '=', active_id)]"/>
+
+        <act_window
+            id="action_open_single_product_brand"
+            name="Product Brand"
+            res_model="product.brand"
+            view_type="form"
+            view_mode="kanban,form,tree"
+            target="current"
+            domain="[('product_ids', 'in', active_id)]"/>
+
+        <record id="view_product_brand_form" model="ir.ui.view">
+            <field name="name">product.brand.form</field>
+            <field name="model">product.brand</field>
+            <field name="arch" type="xml">
+                <form string="Product Brand" version="7.0">
+                    <sheet>
+                        <field name="logo" widget="image" class="oe_avatar oe_left"/>
+                        <div class="oe_title">
+                            <div class="oe_edit_only">
+                                <label for="name" string="Brand Name"/>
+                            </div>
+                            <h1>
+                                <field name="name"/>
+                            </h1>
+                        </div>
+                        <div class="oe_right oe_button_box">
+                            <button
+                                class="oe_inline oe_stat_button"
+                                type="action"
+                                name="%(action_open_brand_products)d"
+                                icon="fa-cubes">
+                                <field name="products_count" string="Products" widget="statinfo" />
+                            </button>
+                        </div>
+                        <group>
+                            <field name="partner_id"/>
+                        </group>
+                        <group string="Description">
+                            <field name="description" nolabel="1"/>
+                        </group>
+                    </sheet>
+                </form>
+            </field>
+        </record>
+
+        <record id="view_product_brand_tree" model="ir.ui.view">
+            <field name="name">product.brand.tree</field>
+            <field name="model">product.brand</field>
+            <field name="arch" type="xml">
+                <tree string="product.brand">
+                    <field name="name"/>
+                    <field name="description"/>
+                    <field name="partner_id"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_product_brand_kanban" model="ir.ui.view">
+            <field name="name">product.brand.kanban</field>
+            <field name="model">product.brand</field>
+            <field name="arch" type="xml">
+                <kanban>
+                    <field name="logo"/>
+                    <field name="products_count"/>
+                    <field name="description"/>
+                    <templates>
+                        <t t-name="kanban-box">
+                            <div class="oe_kanban_vignette oe_semantic_html_override">
+                                <a type="open">
+                                    <img t-att-src="kanban_image('product.product', 'logo', record.id.value)"
+                                         class="oe_kanban_image"/>
+                                </a>
+                                <div class="oe_kanban_details">
+                                    <h4>
+                                        <a type="open">
+                                            <field name="name"/>
+                                        </a>
+                                    </h4>
+                                    <div>
+                                        <a name="%(product_brand.action_open_brand_products)d"
+                                           type="action">
+                                            <t t-esc="record.products_count.value"/> Products
+                                        </a>
+                                    </div>
+                                    <span>
+                                        <t t-esc="record.description.value.substr(0,200)"/>
+                                        <t t-if="record.description.value.length > 200">
+                                            <a type="open"><b>...</b></a>
+                                        </t>
+                                    </span>
+                                </div>
+                            </div>
+                        </t>
+                    </templates>
+                </kanban>
+            </field>
+        </record>
+
+        <record id="product_search_form_view" model="ir.ui.view">
+            <field name="name">product.search.form</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_search_form_view"/>
+            <field name="arch" type="xml">
+                <field name="categ_id" position="after">
+                    <field name="product_brand_id"/>
+                </field>
+                <group string='Group by...' position="inside">
+                    <filter string="Brand" name="groupby_brand" domain="[]"
+                            context="{'group_by' : 'product_brand_id'}"/>
+                </group>
+            </field>
+        </record>
+
+        <record id="view_product_template_search_brand" model="ir.ui.view">
+            <field name="name">product.template.search.brand</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
+            <field name="arch" type="xml">
+                <field name="name" position="after">
+                    <field name="product_brand_id"/>
+                </field>
+                <group string='Group by...' position="inside">
+                    <filter string="Brand" name="groupby_brand" domain="[]"
+                            context="{'group_by' : 'product_brand_id'}"/>
+                </group>
+            </field>
+        </record>
+
+        <record id="product_template_form_brand_add" model="ir.ui.view">
+            <field name="name">product.template.product.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view" />
+            <field name="arch" type="xml">
+                <field name="name" position="after"  >
+                    <field name="product_brand_id" placeholder="Brand"/>
+                </field>
+            </field>
+        </record>
+
+        <record id="view_product_template_kanban_brand" model="ir.ui.view">
+            <field name="name">product kanban view: add brand</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_kanban_view" />
+            <field name="arch" type="xml">
+                <xpath expr="//h4" position="after">
+                    <div>
+                        <a t-if="record.product_brand_id" type="action"
+                           name="%(action_open_single_product_brand)d">
+                            <field name="product_brand_id"/>
+                        </a>
+                    </div>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="view_product_variant_kanban_brand" model="ir.ui.view">
+            <field name="name">product variant kanban view: add brand</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_kanban_view" />
+            <field name="arch" type="xml">
+                <xpath expr="//h4" position="after">
+                    <div>
+                        <a t-if="record.product_brand_id" type="open">
+                            <field name="product_brand_id"/>
+                        </a>
+                    </div>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="view_product_template_tree_brand" model="ir.ui.view">
+            <field name="name">product tree view: add brand</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_tree_view" />
+            <field name="arch" type="xml">
+                <field name="name" position="after">
+                    <field name="product_brand_id"/>
+                </field>
+            </field>
+        </record>
+
+        <record id="view_product_variant_tree_brand" model="ir.ui.view">
+            <field name="name">product variant tree view: add brand</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_product_tree_view" />
+            <field name="arch" type="xml">
+                <field name="name" position="after">
+                    <field name="product_brand_id"/>
+                </field>
+            </field>
+        </record>
+
+        <record model="ir.actions.act_window" id="action_product_brand">
+            <field name="name">Brand</field>
+            <field name="res_model">product.brand</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">kanban,form,tree</field>
+        </record>
+
+        <menuitem
+            name="Product Brands"
+            id="menu_product_brand"
+            action="action_product_brand"
+            parent="base.menu_product"/>
+    </data>
+</openerp>

+ 3 - 0
security/ir.model.access.csv

@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_product_brand_product_manager","product.brand","model_product_brand","base.group_partner_manager",1,1,1,1
+"access_product_brand_public","product.brand.public","model_product_brand",,1,0,0,0

BIN
static/description/icon.png