← Back to team overview

openerp-community team mailing list archive

lp:~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction into lp:openerp-product-attributes

 

Raphaël Valyi - http://www.akretion.com has proposed merging lp:~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction into lp:openerp-product-attributes.

Requested reviews:
  Product Core Editors (product-core-editors)

For more details, see:
https://code.launchpad.net/~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction/+merge/198296

Hello,

This branch is the extraction from the product_customer_code module from the https://code.launchpad.net/~vauxoo/addons-vauxoo/7.0 branch using https://code.launchpad.net/bazaar-extractor (with Nhomar approval for the extraction)

product_customer_code is a simple module adding extra information on products. It does just like the product.supplierinfo but for customers instead. For instance it allows to have different references for the same product according to the customer.

We are starting to use the module in some project at Akretion. Vauxoo is using it too. Can we merge it?

Regards.


-- 
https://code.launchpad.net/~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction/+merge/198296
Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.
=== added directory 'product_customer_code'
=== added file 'product_customer_code/__init__.py'
--- product_customer_code/__init__.py	1970-01-01 00:00:00 +0000
+++ product_customer_code/__init__.py	2013-12-09 17:41:26 +0000
@@ -0,0 +1,2 @@
+import product_customer_code
+import product

=== added file 'product_customer_code/__openerp__.py'
--- product_customer_code/__openerp__.py	1970-01-01 00:00:00 +0000
+++ product_customer_code/__openerp__.py	2013-12-09 17:41:26 +0000
@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+###########################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#
+#    Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/
+#    All Rights Reserved.
+#    info Vauxoo (info@xxxxxxxxxx)
+############################################################################
+#    Coded by: el_rodo_1 (rodo@xxxxxxxxxx)
+############################################################################
+#
+#    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/>.
+#
+##############################################################################
+{
+    "name" : "Products Customer Code",
+    "version" : "1.0",
+    "author" : "Vauxoo",
+    "website" : "http://www.vauxoo.com/";,
+    "license" : "AGPL-3",
+    "category" : "Generic Modules/Product",
+    "depends" : ["base", "product"],
+    "init_xml" : [],
+    "demo_xml" : [],
+    "description": """
+Add manies Codes of Customer's in product
+     """,
+    "update_xml" : ["security/product_customer_code_security.xml",
+                    "security/ir.model.access.csv",
+                    "product_customer_code_view.xml",
+                    "product_product_view.xml",
+                    
+                    ],
+    "active": False,
+    "installable": True,
+}

=== added directory 'product_customer_code/i18n'
=== added file 'product_customer_code/i18n/es.po'
--- product_customer_code/i18n/es.po	1970-01-01 00:00:00 +0000
+++ product_customer_code/i18n/es.po	2013-12-09 17:41:26 +0000
@@ -0,0 +1,122 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_customer_code
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-07 01:08+0000\n"
+"PO-Revision-Date: 2013-11-08 17:49+0000\n"
+"Last-Translator: hbto [Vauxoo] http://www.vauxoo.com "
+"<humbertoarocha@xxxxxxxxx>\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: 2013-12-06 06:26+0000\n"
+"X-Generator: Launchpad (build 16863)\n"
+
+#. module: product_customer_code
+#: field:product.customer.code,partner_id:0
+msgid "Customer"
+msgstr "Cliente"
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Information"
+msgstr "Información"
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Customer Code"
+msgstr "Código del Cliente"
+
+#. module: product_customer_code
+#: sql_constraint:product.customer.code:0
+msgid "Product Code of customer must be unique"
+msgstr "El Codigo del Producto del Cliente Debe ser Unico"
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_manager
+msgid "Product_Customer / Manager"
+msgstr "Product_Customer / Manager"
+
+#. module: product_customer_code
+#: field:product.customer.code,product_code:0
+msgid "Customer Product Code"
+msgstr "Código del Producto por Cliente"
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+#: field:product.customer.code,company_id:0
+msgid "Company"
+msgstr "Compañia"
+
+#. module: product_customer_code
+#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree
+#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code
+#: view:product.customer.code:0
+#: view:product.product:0
+msgid "Product Customer Code"
+msgstr "Código del Producto por Cliente"
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_product
+#: view:product.customer.code:0
+#: field:product.customer.code,product_id:0
+msgid "Product"
+msgstr "Producto"
+
+#. module: product_customer_code
+#: help:product.customer.code,product_code:0
+msgid ""
+"This customer's product code\n"
+"                                            will be used when searching "
+"into\n"
+"                                            a request for quotation."
+msgstr ""
+"El código de Producto del cliente\n"
+"                                            se usará cuando se busque en\n"
+"                                            una solicitud de cotización."
+
+#. module: product_customer_code
+#: field:product.product,product_customer_code_ids:0
+msgid "Customer Codes"
+msgstr "Código del Cliente"
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Group By..."
+msgstr "Agrupar por ..."
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_user
+msgid "Product_Customer / User"
+msgstr "Product_Customer / User"
+
+#. module: product_customer_code
+#: field:product.customer.code,product_name:0
+msgid "Customer Product Name"
+msgstr "Nombre del producto"
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_customer_code
+msgid "Add manies Code of Customer's"
+msgstr "Agregar varios códigos de clientes"
+
+#. module: product_customer_code
+#: help:product.customer.code,product_name:0
+msgid ""
+"This customer's product name will\n"
+"                                            be used when searching into a\n"
+"                                            request for quotation."
+msgstr ""
+"Este nombre de Producto del cliente\n"
+"                                            se usará cuando se busque en\n"
+"                                            una solicitud de cotización."

=== added file 'product_customer_code/i18n/es_MX.po'
--- product_customer_code/i18n/es_MX.po	1970-01-01 00:00:00 +0000
+++ product_customer_code/i18n/es_MX.po	2013-12-09 17:41:26 +0000
@@ -0,0 +1,115 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_customer_code
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-07 01:08+0000\n"
+"PO-Revision-Date: 2013-11-07 05:14+0000\n"
+"Last-Translator: julio <julio@xxxxxxxxxx>\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: 2013-12-06 06:26+0000\n"
+"X-Generator: Launchpad (build 16863)\n"
+
+#. module: product_customer_code
+#: field:product.customer.code,partner_id:0
+msgid "Customer"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Information"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: sql_constraint:product.customer.code:0
+msgid "Product Code of customer must be unique"
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_manager
+msgid "Product_Customer / Manager"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_code:0
+msgid "Customer Product Code"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+#: field:product.customer.code,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree
+#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code
+#: view:product.customer.code:0
+#: view:product.product:0
+msgid "Product Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_product
+#: view:product.customer.code:0
+#: field:product.customer.code,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_code:0
+msgid ""
+"This customer's product code\n"
+"                                            will be used when searching "
+"into\n"
+"                                            a request for quotation."
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.product,product_customer_code_ids:0
+msgid "Customer Codes"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Group By..."
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_user
+msgid "Product_Customer / User"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_name:0
+msgid "Customer Product Name"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Partner"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_customer_code
+msgid "Add manies Code of Customer's"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_name:0
+msgid ""
+"This customer's product name will\n"
+"                                            be used when searching into a\n"
+"                                            request for quotation."
+msgstr ""

=== added file 'product_customer_code/i18n/es_VE.po'
--- product_customer_code/i18n/es_VE.po	1970-01-01 00:00:00 +0000
+++ product_customer_code/i18n/es_VE.po	2013-12-09 17:41:26 +0000
@@ -0,0 +1,115 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_customer_code
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-07 01:08+0000\n"
+"PO-Revision-Date: 2013-11-07 05:08+0000\n"
+"Last-Translator: julio <julio@xxxxxxxxxx>\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: 2013-12-06 06:26+0000\n"
+"X-Generator: Launchpad (build 16863)\n"
+
+#. module: product_customer_code
+#: field:product.customer.code,partner_id:0
+msgid "Customer"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Information"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: sql_constraint:product.customer.code:0
+msgid "Product Code of customer must be unique"
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_manager
+msgid "Product_Customer / Manager"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_code:0
+msgid "Customer Product Code"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+#: field:product.customer.code,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree
+#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code
+#: view:product.customer.code:0
+#: view:product.product:0
+msgid "Product Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_product
+#: view:product.customer.code:0
+#: field:product.customer.code,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_code:0
+msgid ""
+"This customer's product code\n"
+"                                            will be used when searching "
+"into\n"
+"                                            a request for quotation."
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.product,product_customer_code_ids:0
+msgid "Customer Codes"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Group By..."
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_user
+msgid "Product_Customer / User"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_name:0
+msgid "Customer Product Name"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Partner"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_customer_code
+msgid "Add manies Code of Customer's"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_name:0
+msgid ""
+"This customer's product name will\n"
+"                                            be used when searching into a\n"
+"                                            request for quotation."
+msgstr ""

=== added file 'product_customer_code/i18n/product_customer_code.pot'
--- product_customer_code/i18n/product_customer_code.pot	1970-01-01 00:00:00 +0000
+++ product_customer_code/i18n/product_customer_code.pot	2013-12-09 17:41:26 +0000
@@ -0,0 +1,112 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* product_customer_code
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-07 01:08+0000\n"
+"PO-Revision-Date: 2013-11-07 01:08+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_customer_code
+#: field:product.customer.code,partner_id:0
+msgid "Customer"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Information"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.product:0
+msgid "Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: sql_constraint:product.customer.code:0
+msgid "Product Code of customer must be unique"
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_manager
+msgid "Product_Customer / Manager"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_code:0
+msgid "Customer Product Code"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+#: field:product.customer.code,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree
+#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code
+#: view:product.customer.code:0
+#: view:product.product:0
+msgid "Product Customer Code"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_product
+#: view:product.customer.code:0
+#: field:product.customer.code,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_code:0
+msgid "This customer's product code\n"
+"                                            will be used when searching into\n"
+"                                            a request for quotation."
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.product,product_customer_code_ids:0
+msgid "Customer Codes"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Group By..."
+msgstr ""
+
+#. module: product_customer_code
+#: model:res.groups,name:product_customer_code.group_product_customer_code_user
+msgid "Product_Customer / User"
+msgstr ""
+
+#. module: product_customer_code
+#: field:product.customer.code,product_name:0
+msgid "Customer Product Name"
+msgstr ""
+
+#. module: product_customer_code
+#: view:product.customer.code:0
+msgid "Partner"
+msgstr ""
+
+#. module: product_customer_code
+#: model:ir.model,name:product_customer_code.model_product_customer_code
+msgid "Add manies Code of Customer's"
+msgstr ""
+
+#. module: product_customer_code
+#: help:product.customer.code,product_name:0
+msgid "This customer's product name will\n"
+"                                            be used when searching into a\n"
+"                                            request for quotation."
+msgstr ""
+

=== added file 'product_customer_code/product.py'
--- product_customer_code/product.py	1970-01-01 00:00:00 +0000
+++ product_customer_code/product.py	2013-12-09 17:41:26 +0000
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+###########################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#
+#    Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
+#    All Rights Reserved.
+#    info@xxxxxxxxxx
+############################################################################
+#    Coded by: Rodo (rodo@xxxxxxxxxx),Moy (moylop260@xxxxxxxxxx)
+############################################################################
+#
+#    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/>.
+#
+##############################################################################
+from openerp.osv import osv, fields
+from openerp.tools.translate import _
+
+
+class product_product(osv.Model):
+    _inherit = "product.product"
+
+    _columns = {
+        'product_customer_code_ids': fields.one2many('product.customer.code',
+                                                     'product_id',
+                                                     'Customer Codes'),
+    }
+
+    def copy(self, cr, uid, id, default=None, context=None):
+        if not default:
+            default = {}
+        default['product_customer_code_ids'] = False
+        res = super(product_product, self).copy(
+            cr, uid, id, default=default, context=context)
+        return res
+
+    def name_search(self, cr, user, name='', args=None, operator='ilike',
+                    context=None, limit=80):
+        res = super(product_product, self).name_search(
+            cr, user, name, args, operator, context, limit)
+        if not context:
+            context = {}
+        product_customer_code_obj = self.pool.get('product.customer.code')
+        if not res:
+            ids = []
+            partner_id = context.get('partner_id', False)
+            if partner_id:
+                id_prod_code = \
+                        product_customer_code_obj.search(cr, user,
+                                                         [('product_code',
+                                                                '=', name),
+                                                         ('partner_id', '=',
+                                                                 partner_id)],
+                                                         limit=limit,
+                                                         context=context)
+                # TODO: Search for product customer name
+                id_prod = id_prod_code and product_customer_code_obj.browse(
+                    cr, user, id_prod_code, context=context) or []
+                for ppu in id_prod:
+                    ids.append(ppu.product_id.id)
+            if ids:
+                res = self.name_get(cr, user, ids, context)
+        return res

=== added file 'product_customer_code/product_customer_code.py'
--- product_customer_code/product_customer_code.py	1970-01-01 00:00:00 +0000
+++ product_customer_code/product_customer_code.py	2013-12-09 17:41:26 +0000
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+###########################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#
+#    Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
+#    All Rights Reserved.
+#    info@xxxxxxxxxx
+############################################################################
+#    Coded by: Rodo (rodo@xxxxxxxxxx),Moy (moylop260@xxxxxxxxxx)
+############################################################################
+#
+#    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/>.
+#
+##############################################################################
+from openerp.osv import osv, fields
+from openerp.tools.translate import _
+
+
+class product_customer_code(osv.Model):
+    _name = "product.customer.code"
+    _description = "Add manies Code of Customer's"
+
+    _rec_name = 'product_code'
+
+    _columns = {
+        'product_code': fields.char('Customer Product Code', size=64,
+                                    required=True,
+                                    help="""This customer's product code
+                                            will be used when searching into
+                                            a request for quotation."""),
+        'product_name': fields.char('Customer Product Name', size=128,
+                                    help="""This customer's product name will
+                                            be used when searching into a
+                                            request for quotation."""),
+        'product_id': fields.many2one('product.product', 'Product',
+                                      required=True),
+        'partner_id': fields.many2one('res.partner', 'Customer',
+                                      required=True),
+        'company_id': fields.many2one('res.company', 'Company',
+                                      required=False),
+    }
+
+    _defaults = {
+        'company_id': lambda s, cr,
+                            uid, c: s.pool.get('res.company').\
+                                                _company_default_get(cr, uid,
+                                                       'product.customer.code',
+                                                                    context=c),
+    }
+
+    _sql_constraints = [
+        ('unique_code', 'unique(product_code,company_id,partner_id)',
+         'Product Code of customer must be unique'),
+    ]
+
+    # TODO: Add index to product_code, partner_id

=== added file 'product_customer_code/product_customer_code_view.xml'
--- product_customer_code/product_customer_code_view.xml	1970-01-01 00:00:00 +0000
+++ product_customer_code/product_customer_code_view.xml	2013-12-09 17:41:26 +0000
@@ -0,0 +1,60 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<openerp>
+    <data>
+    
+        <record model="ir.ui.view" id="view_product_customer_code_form">
+            <field name="name">view.product.customer.code.form</field>
+            <field name="model">product.customer.code</field>
+            <field name="arch" type="xml">
+                <form string="Product Customer Code" version="7.0">
+                    <field name="product_code"/>
+                    <field name="partner_id"/>
+                     <field name="product_id"/>
+                    <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+                </form>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_product_customer_code_tree">
+            <field name="name">view.product.customer.code.tree</field>
+            <field name="model">product.customer.code</field>
+            <field name="arch" type="xml">
+                <tree string="Product Customer Code">
+                    <field name="product_code"/>
+                    <field name="partner_id"/>
+                    <field name="company_id"/>
+                     <field name="product_id"/>
+                </tree>
+            </field>
+        </record>
+        
+          <record id="action_product_customer_code_tree" model="ir.actions.act_window">
+            <field name="name">Product Customer Code</field>
+            <field name="res_model">product.customer.code</field>
+            <field name="view_type">form</field>
+            <field name="view_id" ref="view_product_customer_code_tree"/>
+        </record>
+        
+        <record id="view_product_customer_code_search" model="ir.ui.view">
+            <field name="name">view.product.customer.code.certificate.search</field>
+            <field name="model">product.customer.code</field>
+            <field name="arch" type="xml">
+                <search string="Product Customer Code">
+                    <field name="product_code"/>
+                    <field name="partner_id"/>
+                    <field name="company_id"/>
+                    <field name="product_id"/>
+                    <newline/>
+                    <group expand="0" string="Group By...">
+                        <filter string="Company" icon="terp-partner" domain="[]" context="{'group_by':'company_id'}"/>
+                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+                        <separator orientation="vertical"/>
+                    </group>
+                </search>
+            </field>
+        </record>
+        
+         <menuitem action="action_product_customer_code_tree" id="menu_product_customer_code" sequence="50" parent="product.prod_config_main" groups="group_product_customer_code_manager"/>
+
+    </data>
+</openerp>
\ No newline at end of file

=== added file 'product_customer_code/product_product_view.xml'
--- product_customer_code/product_product_view.xml	1970-01-01 00:00:00 +0000
+++ product_customer_code/product_product_view.xml	2013-12-09 17:41:26 +0000
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<openerp>
+    <data>
+        
+        <record model="ir.ui.view" id="product_normal_form_inh_product_customer_code_01">
+            <field name="name">product.normal.form.inh.product.customer.code.01</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="arch" type="xml">
+                <page string="Information" position="after">
+                    <page string="Customer Code">
+                         <field name="product_customer_code_ids" nolabel="1" colspan="4" widget="one2many_list">
+                            <tree string="Product Customer Code" editable="bottom">
+                                <field name="product_code"/>
+                                <field name="partner_id"/>
+<!--
+                                <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+-->
+                            </tree>
+                            <form string="Product Customer Code" version="7.0">
+                                <field name="product_code"/>
+                                <field name="partner_id"/>
+                            </form> 
+                        </field>
+                    </page>
+                </page>
+            </field>
+        </record>
+        
+    </data>
+</openerp>
\ No newline at end of file

=== added directory 'product_customer_code/security'
=== added file 'product_customer_code/security/ir.model.access.csv'
--- product_customer_code/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ product_customer_code/security/ir.model.access.csv	2013-12-09 17:41:26 +0000
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_create,perm_unlink,perm_write,perm_read
+access_product_customer_code_user,product.customer.code.user,model_product_customer_code,group_product_customer_code_user,0,0,0,1
+access_product_customer_code_manager,product.customer.code.manager,model_product_customer_code,group_product_customer_code_manager,1,1,1,1

=== added file 'product_customer_code/security/product_customer_code_security.xml'
--- product_customer_code/security/product_customer_code_security.xml	1970-01-01 00:00:00 +0000
+++ product_customer_code/security/product_customer_code_security.xml	2013-12-09 17:41:26 +0000
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<openerp>
+    <data noupdate="0">
+            <record id="group_product_customer_code_manager" model="res.groups">
+                <field name="name">Product_Customer / Manager</field>
+            </record>
+            <record id="group_product_customer_code_user" model="res.groups">
+                <field name="name">Product_Customer / User</field>
+            </record>
+
+    </data>
+</openerp>
\ No newline at end of file


Follow ups