Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.0-product_partner_upc-dev-rodo into lp:addons-vauxoo
- addons-vauxoo-6.0-product_partner_upc-dev-rodo
- Merge into 6.0-trunk
Status: | Merged |
---|---|
Merge reported by: | Moisés López - http://www.vauxoo.com |
Merged at revision: | not available |
Proposed branch: | lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.0-product_partner_upc-dev-rodo |
Merge into: | lp:addons-vauxoo |
Diff against target: |
358 lines (+311/-0) 9 files modified
product_customer_code/__init__.py (+2/-0) product_customer_code/__openerp__.py (+47/-0) product_customer_code/i18n/es.po (+92/-0) product_customer_code/product.py (+51/-0) product_customer_code/product_customer_code.py (+52/-0) product_customer_code/product_customer_code.xml (+32/-0) product_customer_code/product_product.xml (+20/-0) product_customer_code/security/ir.model.access.csv (+3/-0) product_customer_code/security/product_customer_code_security.xml (+12/-0) |
To merge this branch: | bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.0-product_partner_upc-dev-rodo |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Moisés López - http://www.vauxoo.com | Approve | ||
Rodolfo Lopez | Pending | ||
Luis Torres - http://www.vauxoo.com | Pending | ||
Review via email:
|
Commit message
Description of the change
[ADD][module product_
añade one2many en productos para agregar upc y un partner
esto permite que el mismo producto pueda ser reconocido por diferentes códigos segun el partner lo mencione.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
También agrega un index del product_code, para saber como se hace esto, verifica la función "def _auto_init"
del "account/
def _auto_init(self, cr, context=None):
if not cr.fetchone():
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
Agrega el campo "company_id" y pon el default, como lo hacen las demás funciones de los otros modelos.
Modifica el
_sql_constraints = [
]
Lo correcto debería de ser:
_sql_constraints = [
('number_uniq', 'unique(
]
(cambiar los mensajes a ingles, y con los nuevos nombres de campos)
Analizar la opción de mandar en el context el partner_id, desde la venta, para que lo procese la búsqueda de mapeo con sus códigos.
- 288. By Rodolfo Lopez
-
[MERGE][delete querys, and add licenses]
- 289. By Luis Torres - http://www.vauxoo.com
-
[REF]Names were changed
- 290. By Luis Torres - http://www.vauxoo.com
-
[REF]Names were changed from partner_upc to customer_code
- 291. By Luis Torres - http://www.vauxoo.com
-
[ REF]Was changed to required fiel partner_id
- 292. By Luis Torres - http://www.vauxoo.com
-
[ADD]Add security and goups
- 293. By Luis Torres - http://www.vauxoo.com
-
[IMP]Add fiel company_id & your default
- 294. By Luis Torres - http://www.vauxoo.com
-
[IMP][product_
customer_ code]Add traducction & Constrains of product code - 295. By Luis Torres - http://www.vauxoo.com
-
[ADD][product_
customer_ code]Sale. order.line was added to a context for when seeking the product_id just look client code that partner.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
Modifica lo siguiente:
1) Crear el grupo manager y user (uno ya está creado)
2) Asignar al ir.rules el grupo manager & user segúń corresponda
Apóyate de la siguiente propuesta de merge:
https:/
- 296. By Luis Torres - http://www.vauxoo.com
-
[ADD][product_
customer_ code]Was create the groups user - 297. By Luis Torres - http://www.vauxoo.com
-
[IMP][product_
customer_ code]Add traduction of english
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
Dejar solo un es_MX.po (hay 2 el otro es es_Mx.po)
Eliminar el .pot (es un binario que te genera poedit, que no se necesita)
Eliminar los comentarios de TODO
Agregar index para búsquedas más eficientes.
- 298. By Moisés López - http://www.vauxoo.com
-
[REF] [product_
customer_ code] Rename standard security xml file - 299. By Moisés López - http://www.vauxoo.com
-
[REF] [product_
customer_ code] Standard to i18n - 300. By Moisés López - http://www.vauxoo.com
-
[FIX] [product_
customer_ code] Fix context. get('partner_ id') validation - 301. By Moisés López - http://www.vauxoo.com
-
[REF][product_
customer_ code] Change code to file product.py. Remove comment's. Add ToDo messages - 302. By Moisés López - http://www.vauxoo.com
-
[FIX][product_
customer_ code] Add import to new file. - 303. By Moisés López - http://www.vauxoo.com
-
[REF] [product_
custome_ code] Replace tab for spaces in xml view file
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) wrote : | # |
Agregarle al campo company_id el grupo multi-company
- 304. By Moisés López - http://www.vauxoo.com
-
[REF] [product_
customer_ code] Add group multi-company to field company_id.
Add required company_id.
Change help text
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Moisés López - http://www.vauxoo.com (moylop260) : | # |
Preview Diff
1 | === added directory 'product_customer_code' | |||
2 | === added file 'product_customer_code/__init__.py' | |||
3 | --- product_customer_code/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ product_customer_code/__init__.py 2012-07-07 21:55:21 +0000 | |||
5 | @@ -0,0 +1,2 @@ | |||
6 | 1 | import product_customer_code | ||
7 | 2 | import product | ||
8 | 0 | 3 | ||
9 | === added file 'product_customer_code/__openerp__.py' | |||
10 | --- product_customer_code/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
11 | +++ product_customer_code/__openerp__.py 2012-07-07 21:55:21 +0000 | |||
12 | @@ -0,0 +1,47 @@ | |||
13 | 1 | # -*- encoding: utf-8 -*- | ||
14 | 2 | ########################################################################### | ||
15 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
16 | 4 | # | ||
17 | 5 | # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/ | ||
18 | 6 | # All Rights Reserved. | ||
19 | 7 | # info Vauxoo (info@vauxoo.com) | ||
20 | 8 | ############################################################################ | ||
21 | 9 | # Coded by: el_rodo_1 (rodo@vauxoo.com) | ||
22 | 10 | ############################################################################ | ||
23 | 11 | # | ||
24 | 12 | # This program is free software: you can redistribute it and/or modify | ||
25 | 13 | # it under the terms of the GNU Affero General Public License as | ||
26 | 14 | # published by the Free Software Foundation, either version 3 of the | ||
27 | 15 | # License, or (at your option) any later version. | ||
28 | 16 | # | ||
29 | 17 | # This program is distributed in the hope that it will be useful, | ||
30 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
31 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
32 | 20 | # GNU Affero General Public License for more details. | ||
33 | 21 | # | ||
34 | 22 | # You should have received a copy of the GNU Affero General Public License | ||
35 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
36 | 24 | # | ||
37 | 25 | ############################################################################## | ||
38 | 26 | { | ||
39 | 27 | "name" : "Products Customer Code", | ||
40 | 28 | "version" : "1.0", | ||
41 | 29 | "author" : "Vauxoo", | ||
42 | 30 | "website" : "http://www.vauxoo.com/", | ||
43 | 31 | "license" : "AGPL-3", | ||
44 | 32 | "category" : "Generic Modules/Product", | ||
45 | 33 | "depends" : ["base", "product"], | ||
46 | 34 | "init_xml" : [], | ||
47 | 35 | "demo_xml" : [], | ||
48 | 36 | "description": """ | ||
49 | 37 | Add manies Codes of Customer's in product | ||
50 | 38 | """, | ||
51 | 39 | "update_xml" : ["security/product_customer_code_security.xml", | ||
52 | 40 | "security/ir.model.access.csv", | ||
53 | 41 | "product_customer_code.xml", | ||
54 | 42 | "product_product.xml", | ||
55 | 43 | |||
56 | 44 | ], | ||
57 | 45 | "active": False, | ||
58 | 46 | "installable": True, | ||
59 | 47 | } | ||
60 | 0 | 48 | ||
61 | === added directory 'product_customer_code/i18n' | |||
62 | === added file 'product_customer_code/i18n/es.po' | |||
63 | --- product_customer_code/i18n/es.po 1970-01-01 00:00:00 +0000 | |||
64 | +++ product_customer_code/i18n/es.po 2012-07-07 21:55:21 +0000 | |||
65 | @@ -0,0 +1,92 @@ | |||
66 | 1 | # Translation of OpenERP Server. | ||
67 | 2 | # This file contains the translation of the following modules: | ||
68 | 3 | # * product_customer_code | ||
69 | 4 | # | ||
70 | 5 | msgid "" | ||
71 | 6 | msgstr "" | ||
72 | 7 | "Project-Id-Version: OpenERP Server 6.1\n" | ||
73 | 8 | "Report-Msgid-Bugs-To: \n" | ||
74 | 9 | "POT-Creation-Date: 2012-07-02 20:40+0000\n" | ||
75 | 10 | "PO-Revision-Date: 2012-07-02 20:40+0000\n" | ||
76 | 11 | "Last-Translator: <>\n" | ||
77 | 12 | "Language-Team: \n" | ||
78 | 13 | "MIME-Version: 1.0\n" | ||
79 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
80 | 15 | "Content-Transfer-Encoding: \n" | ||
81 | 16 | "Plural-Forms: \n" | ||
82 | 17 | |||
83 | 18 | #. module: product_customer_code | ||
84 | 19 | #: view:product.product:0 | ||
85 | 20 | msgid "Information" | ||
86 | 21 | msgstr "Información" | ||
87 | 22 | |||
88 | 23 | #. module: product_customer_code | ||
89 | 24 | #: view:product.product:0 | ||
90 | 25 | msgid "Customer Code" | ||
91 | 26 | msgstr "Código del Cliente" | ||
92 | 27 | |||
93 | 28 | #. module: product_customer_code | ||
94 | 29 | #: model:res.groups,name:product_customer_code.group_product_customer_code | ||
95 | 30 | msgid "Product_Customer / Manager" | ||
96 | 31 | msgstr "Producto_Cliente / Gerente" | ||
97 | 32 | |||
98 | 33 | #. module: product_customer_code | ||
99 | 34 | #: field:product.customer.code,product_code:0 | ||
100 | 35 | msgid "Customer Product Code" | ||
101 | 36 | msgstr "Código del Producto por Cliente" | ||
102 | 37 | |||
103 | 38 | #. module: product_customer_code | ||
104 | 39 | #: field:product.customer.code,company_id:0 | ||
105 | 40 | msgid "Company" | ||
106 | 41 | msgstr "Compañia" | ||
107 | 42 | |||
108 | 43 | #. module: product_customer_code | ||
109 | 44 | #: view:product.customer.code:0 | ||
110 | 45 | msgid "Product Customer Code" | ||
111 | 46 | msgstr "Código del Producto por Cliente" | ||
112 | 47 | |||
113 | 48 | #. module: product_customer_code | ||
114 | 49 | #: model:ir.model,name:product_customer_code.model_product_product | ||
115 | 50 | #: field:product.customer.code,product_id:0 | ||
116 | 51 | msgid "Product" | ||
117 | 52 | msgstr "Producto" | ||
118 | 53 | |||
119 | 54 | #. module: product_customer_code | ||
120 | 55 | #: field:product.product,product_customer_code_ids:0 | ||
121 | 56 | msgid "Customer Codes" | ||
122 | 57 | msgstr "Código del Cliente" | ||
123 | 58 | |||
124 | 59 | #. module: product_customer_code | ||
125 | 60 | #: constraint:product.product:0 | ||
126 | 61 | msgid "Error: Invalid ean code" | ||
127 | 62 | msgstr "Error: Código EAN erróneo" | ||
128 | 63 | |||
129 | 64 | #. module: product_customer_code | ||
130 | 65 | #: help:product.customer.code,product_code:0 | ||
131 | 66 | msgid "This customer's product code will be used when searching into a request for quotation." | ||
132 | 67 | msgstr "El código de producto de este cliente se utiliza cuando se busca dentro de una solicitud de cotización." | ||
133 | 68 | |||
134 | 69 | #. module: product_customer_code | ||
135 | 70 | #: field:product.customer.code,product_name:0 | ||
136 | 71 | msgid "Customer Product Name" | ||
137 | 72 | msgstr "Nombre del producto" | ||
138 | 73 | |||
139 | 74 | #. module: product_customer_code | ||
140 | 75 | #: field:product.customer.code,partner_id:0 | ||
141 | 76 | msgid "Customer" | ||
142 | 77 | msgstr "Cliente" | ||
143 | 78 | |||
144 | 79 | #. module: product_customer_code | ||
145 | 80 | #: help:product.customer.code,product_name:0 | ||
146 | 81 | msgid "This customer's product name will be used when searching into a request for quotation." | ||
147 | 82 | msgstr "El nombre de producto de este cliente se utiliza cuando se busca dentro de una solicitud de cotización." | ||
148 | 83 | |||
149 | 84 | #. module: product_customer_code | ||
150 | 85 | #: model:ir.model,name:product_customer_code.model_product_customer_code | ||
151 | 86 | msgid "Add manies Code of Customer's" | ||
152 | 87 | msgstr "Agregar varios códigos de clientes" | ||
153 | 88 | |||
154 | 89 | #. module: product_customer_code | ||
155 | 90 | #: sql_constraint:product.customer.code:0 | ||
156 | 91 | msgid "Product Code must be unique" | ||
157 | 92 | msgstr "El código del producto debe ser unico" | ||
158 | 0 | 93 | ||
159 | === added file 'product_customer_code/product.py' | |||
160 | --- product_customer_code/product.py 1970-01-01 00:00:00 +0000 | |||
161 | +++ product_customer_code/product.py 2012-07-07 21:55:21 +0000 | |||
162 | @@ -0,0 +1,51 @@ | |||
163 | 1 | # -*- coding: utf-8 -*- | ||
164 | 2 | ########################################################################### | ||
165 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
166 | 4 | # | ||
167 | 5 | # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com | ||
168 | 6 | # All Rights Reserved. | ||
169 | 7 | # info@vauxoo.com | ||
170 | 8 | ############################################################################ | ||
171 | 9 | # Coded by: Rodo (rodo@vauxoo.com),Moy (moylop260@vauxoo.com) | ||
172 | 10 | ############################################################################ | ||
173 | 11 | # | ||
174 | 12 | # This program is free software: you can redistribute it and/or modify | ||
175 | 13 | # it under the terms of the GNU Affero General Public License as | ||
176 | 14 | # published by the Free Software Foundation, either version 3 of the | ||
177 | 15 | # License, or (at your option) any later version. | ||
178 | 16 | # | ||
179 | 17 | # This program is distributed in the hope that it will be useful, | ||
180 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
181 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
182 | 20 | # GNU Affero General Public License for more details. | ||
183 | 21 | # | ||
184 | 22 | # You should have received a copy of the GNU Affero General Public License | ||
185 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
186 | 24 | # | ||
187 | 25 | ############################################################################## | ||
188 | 26 | from osv import osv, fields | ||
189 | 27 | from tools.translate import _ | ||
190 | 28 | |||
191 | 29 | class product_product(osv.osv): | ||
192 | 30 | _inherit = "product.product" | ||
193 | 31 | |||
194 | 32 | _columns = { | ||
195 | 33 | 'product_customer_code_ids': fields.one2many('product.customer.code', 'product_id', 'Customer Codes'), | ||
196 | 34 | } | ||
197 | 35 | |||
198 | 36 | def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80): | ||
199 | 37 | res = super(product_product, self).name_search(cr, user, name, args, operator, context, limit) | ||
200 | 38 | product_customer_code_obj=self.pool.get('product.customer.code') | ||
201 | 39 | if not res: | ||
202 | 40 | ids=[] | ||
203 | 41 | partner_id = context.get('partner_id', False) | ||
204 | 42 | if partner_id: | ||
205 | 43 | id_prod_code=product_customer_code_obj.search(cr, user, [('product_code','=',name),('partner_id','=',partner_id)], limit=limit, context=context) | ||
206 | 44 | #TODO: Search for product customer name | ||
207 | 45 | id_prod=id_prod_code and product_customer_code_obj.browse(cr, user, id_prod_code, context=context) or [] | ||
208 | 46 | for ppu in id_prod: | ||
209 | 47 | ids.append(ppu.product_id.id) | ||
210 | 48 | if ids: | ||
211 | 49 | res = self.name_get(cr, user, ids, context) | ||
212 | 50 | return res | ||
213 | 51 | product_product() | ||
214 | 0 | 52 | ||
215 | === added file 'product_customer_code/product_customer_code.py' | |||
216 | --- product_customer_code/product_customer_code.py 1970-01-01 00:00:00 +0000 | |||
217 | +++ product_customer_code/product_customer_code.py 2012-07-07 21:55:21 +0000 | |||
218 | @@ -0,0 +1,52 @@ | |||
219 | 1 | # -*- coding: utf-8 -*- | ||
220 | 2 | ########################################################################### | ||
221 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
222 | 4 | # | ||
223 | 5 | # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com | ||
224 | 6 | # All Rights Reserved. | ||
225 | 7 | # info@vauxoo.com | ||
226 | 8 | ############################################################################ | ||
227 | 9 | # Coded by: Rodo (rodo@vauxoo.com),Moy (moylop260@vauxoo.com) | ||
228 | 10 | ############################################################################ | ||
229 | 11 | # | ||
230 | 12 | # This program is free software: you can redistribute it and/or modify | ||
231 | 13 | # it under the terms of the GNU Affero General Public License as | ||
232 | 14 | # published by the Free Software Foundation, either version 3 of the | ||
233 | 15 | # License, or (at your option) any later version. | ||
234 | 16 | # | ||
235 | 17 | # This program is distributed in the hope that it will be useful, | ||
236 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
237 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
238 | 20 | # GNU Affero General Public License for more details. | ||
239 | 21 | # | ||
240 | 22 | # You should have received a copy of the GNU Affero General Public License | ||
241 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
242 | 24 | # | ||
243 | 25 | ############################################################################## | ||
244 | 26 | from osv import osv, fields | ||
245 | 27 | from tools.translate import _ | ||
246 | 28 | |||
247 | 29 | class product_customer_code(osv.osv): | ||
248 | 30 | _name = "product.customer.code" | ||
249 | 31 | _description = "Add manies Code of Customer's" | ||
250 | 32 | |||
251 | 33 | _rec_name = 'product_code' | ||
252 | 34 | |||
253 | 35 | _columns = { | ||
254 | 36 | '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."), | ||
255 | 37 | '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."), | ||
256 | 38 | 'product_id': fields.many2one('product.product', 'Product', required=True), | ||
257 | 39 | 'partner_id': fields.many2one('res.partner', 'Customer', required=True), | ||
258 | 40 | 'company_id': fields.many2one('res.company','Company', required=True), | ||
259 | 41 | } | ||
260 | 42 | |||
261 | 43 | _defaults = { | ||
262 | 44 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.customer.code', context=c), | ||
263 | 45 | } | ||
264 | 46 | |||
265 | 47 | _sql_constraints = [ | ||
266 | 48 | ('unique_code', 'unique(product_code,company_id,partner_id)', 'Product Code must be unique'), | ||
267 | 49 | ] | ||
268 | 50 | |||
269 | 51 | #TODO: Add index to product_code, partner_id | ||
270 | 52 | product_customer_code() | ||
271 | 0 | 53 | ||
272 | === added file 'product_customer_code/product_customer_code.xml' | |||
273 | --- product_customer_code/product_customer_code.xml 1970-01-01 00:00:00 +0000 | |||
274 | +++ product_customer_code/product_customer_code.xml 2012-07-07 21:55:21 +0000 | |||
275 | @@ -0,0 +1,32 @@ | |||
276 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
277 | 2 | <openerp> | ||
278 | 3 | <data> | ||
279 | 4 | |||
280 | 5 | <record model="ir.ui.view" id="view_product_customer_code_form"> | ||
281 | 6 | <field name="name">view.product.customer.code.form</field> | ||
282 | 7 | <field name="model">product.customer.code</field> | ||
283 | 8 | <field name="type">form</field> | ||
284 | 9 | <field name="arch" type="xml"> | ||
285 | 10 | <form string="Product Customer Code"> | ||
286 | 11 | <field name="product_code"/> | ||
287 | 12 | <field name="partner_id"/> | ||
288 | 13 | <field name="company_id" widget="selection" groups="base.group_multi_company"/> | ||
289 | 14 | </form> | ||
290 | 15 | </field> | ||
291 | 16 | </record> | ||
292 | 17 | <record model="ir.ui.view" id="view_product_customer_code_tree"> | ||
293 | 18 | <field name="name">view.product.customer.code.tree</field> | ||
294 | 19 | <field name="model">product.customer.code</field> | ||
295 | 20 | <field name="type">tree</field> | ||
296 | 21 | <field name="arch" type="xml"> | ||
297 | 22 | <tree string="Product Customer Code" editable="bottom"> | ||
298 | 23 | <field name="product_code"/> | ||
299 | 24 | <field name="partner_id"/> | ||
300 | 25 | <field name="company_id" widget="selection" groups="base.group_multi_company"/> | ||
301 | 26 | </tree> | ||
302 | 27 | </field> | ||
303 | 28 | </record> | ||
304 | 29 | |||
305 | 30 | </data> | ||
306 | 31 | </openerp> | ||
307 | 32 | |||
308 | 0 | 33 | ||
309 | === added file 'product_customer_code/product_product.xml' | |||
310 | --- product_customer_code/product_product.xml 1970-01-01 00:00:00 +0000 | |||
311 | +++ product_customer_code/product_product.xml 2012-07-07 21:55:21 +0000 | |||
312 | @@ -0,0 +1,20 @@ | |||
313 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
314 | 2 | <openerp> | ||
315 | 3 | <data> | ||
316 | 4 | |||
317 | 5 | <record model="ir.ui.view" id="product_normal_form_inh_product_customer_code_01"> | ||
318 | 6 | <field name="name">product.normal.form.inh.product.customer.code.01</field> | ||
319 | 7 | <field name="model">product.product</field> | ||
320 | 8 | <field name="type">form</field> | ||
321 | 9 | <field name="inherit_id" ref="product.product_normal_form_view"/> | ||
322 | 10 | <field name="arch" type="xml"> | ||
323 | 11 | <page string="Information" position="after"> | ||
324 | 12 | <page string="Customer Code"> | ||
325 | 13 | <field name="product_customer_code_ids" colspan="4" nolabel="1"/> | ||
326 | 14 | </page> | ||
327 | 15 | </page> | ||
328 | 16 | </field> | ||
329 | 17 | </record> | ||
330 | 18 | |||
331 | 19 | </data> | ||
332 | 20 | </openerp> | ||
333 | 0 | 21 | ||
334 | === added directory 'product_customer_code/security' | |||
335 | === added file 'product_customer_code/security/ir.model.access.csv' | |||
336 | --- product_customer_code/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
337 | +++ product_customer_code/security/ir.model.access.csv 2012-07-07 21:55:21 +0000 | |||
338 | @@ -0,0 +1,3 @@ | |||
339 | 1 | id,name,model_id:id,group_id:id,perm_create,perm_unlink,perm_write,perm_read | ||
340 | 2 | access_product_customer_code_user,product.customer.code.user,model_product_customer_code,,0,0,0,1 | ||
341 | 3 | access_product_customer_code_manager,product.customer.code.manager,model_product_customer_code,,1,1,1,1 | ||
342 | 0 | 4 | ||
343 | === added file 'product_customer_code/security/product_customer_code_security.xml' | |||
344 | --- product_customer_code/security/product_customer_code_security.xml 1970-01-01 00:00:00 +0000 | |||
345 | +++ product_customer_code/security/product_customer_code_security.xml 2012-07-07 21:55:21 +0000 | |||
346 | @@ -0,0 +1,12 @@ | |||
347 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
348 | 2 | <openerp> | ||
349 | 3 | <data noupdate="0"> | ||
350 | 4 | <record id="group_product_customer_code_manager" model="res.groups"> | ||
351 | 5 | <field name="name">Product_Customer / Manager</field> | ||
352 | 6 | </record> | ||
353 | 7 | <record id="group_product_customer_code_user" model="res.groups"> | ||
354 | 8 | <field name="name">Product_Customer / User</field> | ||
355 | 9 | </record> | ||
356 | 10 | |||
357 | 11 | </data> | ||
358 | 12 | </openerp> |
Rodo,
Cambia el author y descripción del __openerp__.py y del __terp__.py
Así como también agrega los comentarios de licencia al inicio por favor.
Sustituye los query por search a toda costa.
Y quita el search de packaging que ese es de otro módulo.
Verifica por que hay 2 campos many2one a product.
Cambia el nombre del campo upc por product_code. (Tal cual lo hace actualmente product. supplierinfo, solo cambiando donde dice supplier, ahora es customer)
'product_ code': fields. char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
Y agrega también
'product_ name': fields. char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
Hay que modificar la venta, para que tome en el descripción el product_code & product_name del cliente, en su pedido de venta.