Merge lp:~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction into lp:~product-core-editors/openerp-product-attributes/7.0
- 7.0-product-customer-code-extraction
- Merge into 7.0
Status: | Merged |
---|---|
Merged at revision: | 247 |
Proposed branch: | lp:~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction |
Merge into: | lp:~product-core-editors/openerp-product-attributes/7.0 |
Diff against target: |
844 lines (+775/-0) 12 files modified
product_customer_code/__init__.py (+2/-0) product_customer_code/__openerp__.py (+60/-0) product_customer_code/i18n/es.po (+122/-0) product_customer_code/i18n/es_MX.po (+115/-0) product_customer_code/i18n/es_VE.po (+115/-0) product_customer_code/i18n/product_customer_code.pot (+112/-0) product_customer_code/product.py (+73/-0) product_customer_code/product_customer_code.py (+67/-0) product_customer_code/product_customer_code_view.xml (+61/-0) product_customer_code/product_product_view.xml (+31/-0) product_customer_code/security/ir.model.access.csv (+3/-0) product_customer_code/security/product_customer_code_security.xml (+14/-0) |
To merge this branch: | bzr merge lp:~akretion-team/openerp-product-attributes/7.0-product-customer-code-extraction |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joël Grand-Guillaume @ camptocamp | code review, no tests | Approve | |
Lorenzo Battistini (community) | code review | Approve | |
David BEAL (ak) (community) | Needs Information | ||
Nhomar - Vauxoo | Needs Fixing | ||
Review via email: mp+198296@code.launchpad.net |
Commit message
Description of the change
Hello,
This branch is the extraction from the product_
product_
We are starting to use the module in some project at Akretion. Vauxoo is using it too. Can we merge it?
Regards.
Nhomar - Vauxoo (nhomar) wrote : | # |
@Raph.
I will fix all the @v7 part to merge in your branch before this merge.
THis is the group of modules that we didn't migrate yet complete to v7 ;-)
Be in touch.
Thanks for the extraction job.
PS: I will mark as need fixing until we make the job.
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
@Nhomar,
please take my branch and ask a merge in my branch (you don't have the
right, you are not good enough to be accepted in akretion-team ;-), this is
a simplest because the extraction is a boring task.
On Fri, Dec 13, 2013 at 10:25 AM, Nhomar - Vauxoo <email address hidden> wrote:
> Review: Needs Fixing
>
> @Raph.
>
> I will fix all the @v7 part to merge in your branch before this merge.
>
> THis is the group of modules that we didn't migrate yet complete to v7 ;-)
>
> Be in touch.
>
> Thanks for the extraction job.
>
> PS: I will mark as need fixing until we make the job.
> --
>
> https:/
> Your team OpenERP Community is subscribed to branch
> lp:openerp-product-attributes.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
David BEAL (ak) (davidbeal) wrote : | # |
I've done a module with very close features
http://
The name is more generic (partner -> customer)
It is partner oriented (o2m) rather than product
The fields (code + description) are usable in sale.order and invoice
Perhaps some features must be merged.
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
Hello, the merge is now including fixes by Nhomar https:/
How does it look for you?
Lorenzo Battistini (elbati) wrote : | # |
On 12/13/2013 04:55 PM, Raphaël Valyi - http://
> Hello, the merge is now including fixes by Nhomar https:/
Thanks.
Just one missing thing: every reference to 'osv' should be replaced by 'orm'
BTW, I can't find any remark about this on
https:/
and
https:/
If this requirement is still valid, we should update the documentation.
David BEAL (ak) (davidbeal) wrote : | # |
Why not unify supplier code and customer code (or begin to unify, i know there is a similar concept for supplier) ?
A customer may be a supplier too. => partner
Lorenzo Battistini (elbati) wrote : | # |
On 01/07/2014 05:20 PM, David BEAL wrote:
> Review: Needs Information
>
> Why not unify supplier code and customer code (or begin to unify, i know there is a similar concept for supplier) ?
Do you mean using 'product.
I prefer to keep them distinct, because supplierinfo entails behaviours
related to procurements. Thus, fields names and descriptions of
'product.
orders, then, even trying to unify them, it would create confusion I think.
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
I set this MP as Work in progress as it is in "Needs Fixing" since weeks. Please set it back to "Need Review" once you think you are done.
Lorenzo Battistini (elbati) wrote : | # |
We proposed some improvements with this MP
https:/
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
Hello I merged Lorenzo Battistini changed into this MP, how does it look now?
Lorenzo Battistini (elbati) : | # |
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : | # |
Hi,
This looks good to me, thanks for the contrib.
@Raphaël : Would have be good to set up this MP from "Work in progress" to "Needs reivew" once you've made the last corrections, otherwise it doesn't appear in review list.. => I correct that now.
Regards,
Joël
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 2014-03-14 15:29:41 +0000 |
5 | @@ -0,0 +1,2 @@ |
6 | +import product_customer_code |
7 | +import product |
8 | |
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 2014-03-14 15:29:41 +0000 |
12 | @@ -0,0 +1,60 @@ |
13 | +# -*- encoding: utf-8 -*- |
14 | +########################################################################### |
15 | +# Module Writen to OpenERP, Open Source Management Solution |
16 | +# |
17 | +# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/ |
18 | +# All Rights Reserved. |
19 | +# info Vauxoo (info@vauxoo.com) |
20 | +############################################################################ |
21 | +# Coded by: el_rodo_1 (rodo@vauxoo.com) |
22 | +############################################################################ |
23 | +# |
24 | +# This program is free software: you can redistribute it and/or modify |
25 | +# it under the terms of the GNU Affero General Public License as |
26 | +# published by the Free Software Foundation, either version 3 of the |
27 | +# License, or (at your option) any later version. |
28 | +# |
29 | +# This program is distributed in the hope that it will be useful, |
30 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
31 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
32 | +# GNU Affero General Public License for more details. |
33 | +# |
34 | +# You should have received a copy of the GNU Affero General Public License |
35 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
36 | +# |
37 | +############################################################################## |
38 | +{ |
39 | + "name": "Products Customer Code", |
40 | + "version": "1.0", |
41 | + "author": "Vauxoo", |
42 | + "website": "http://www.vauxoo.com/", |
43 | + "license": "AGPL-3", |
44 | + "category": "Generic Modules/Product", |
45 | + "summary": "Add many Customers' Codes in product", |
46 | + "depends": [ |
47 | + "base", |
48 | + "product", |
49 | + ], |
50 | + "description": """ |
51 | +Customer' codes in product |
52 | +========================== |
53 | + |
54 | +This module does just like the product.supplierinfo but for customers instead. For instance it |
55 | +allows to have different references for the same product according to the customer. |
56 | + |
57 | +.. image:: product_customer_code/static/src/img/screenshot1.png |
58 | + |
59 | +.. tip:: |
60 | + |
61 | + You will need install some of the Apps which enable the product menu to see this module in |
62 | + action, like Sales, Purchase or Warehouse Management |
63 | + """, |
64 | + "data": [ |
65 | + "security/product_customer_code_security.xml", |
66 | + "security/ir.model.access.csv", |
67 | + "product_customer_code_view.xml", |
68 | + "product_product_view.xml", |
69 | + ], |
70 | + "active": False, |
71 | + "installable": True, |
72 | +} |
73 | |
74 | === added directory 'product_customer_code/i18n' |
75 | === added file 'product_customer_code/i18n/es.po' |
76 | --- product_customer_code/i18n/es.po 1970-01-01 00:00:00 +0000 |
77 | +++ product_customer_code/i18n/es.po 2014-03-14 15:29:41 +0000 |
78 | @@ -0,0 +1,122 @@ |
79 | +# Translation of OpenERP Server. |
80 | +# This file contains the translation of the following modules: |
81 | +# * product_customer_code |
82 | +# |
83 | +msgid "" |
84 | +msgstr "" |
85 | +"Project-Id-Version: OpenERP Server 6.1\n" |
86 | +"Report-Msgid-Bugs-To: \n" |
87 | +"POT-Creation-Date: 2013-11-07 01:08+0000\n" |
88 | +"PO-Revision-Date: 2013-11-08 17:49+0000\n" |
89 | +"Last-Translator: hbto [Vauxoo] http://www.vauxoo.com " |
90 | +"<humbertoarocha@gmail.com>\n" |
91 | +"Language-Team: \n" |
92 | +"MIME-Version: 1.0\n" |
93 | +"Content-Type: text/plain; charset=UTF-8\n" |
94 | +"Content-Transfer-Encoding: 8bit\n" |
95 | +"X-Launchpad-Export-Date: 2013-12-06 06:26+0000\n" |
96 | +"X-Generator: Launchpad (build 16863)\n" |
97 | + |
98 | +#. module: product_customer_code |
99 | +#: field:product.customer.code,partner_id:0 |
100 | +msgid "Customer" |
101 | +msgstr "Cliente" |
102 | + |
103 | +#. module: product_customer_code |
104 | +#: view:product.product:0 |
105 | +msgid "Information" |
106 | +msgstr "Información" |
107 | + |
108 | +#. module: product_customer_code |
109 | +#: view:product.product:0 |
110 | +msgid "Customer Code" |
111 | +msgstr "Código del Cliente" |
112 | + |
113 | +#. module: product_customer_code |
114 | +#: sql_constraint:product.customer.code:0 |
115 | +msgid "Product Code of customer must be unique" |
116 | +msgstr "El Codigo del Producto del Cliente Debe ser Unico" |
117 | + |
118 | +#. module: product_customer_code |
119 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_manager |
120 | +msgid "Product_Customer / Manager" |
121 | +msgstr "Product_Customer / Manager" |
122 | + |
123 | +#. module: product_customer_code |
124 | +#: field:product.customer.code,product_code:0 |
125 | +msgid "Customer Product Code" |
126 | +msgstr "Código del Producto por Cliente" |
127 | + |
128 | +#. module: product_customer_code |
129 | +#: view:product.customer.code:0 |
130 | +#: field:product.customer.code,company_id:0 |
131 | +msgid "Company" |
132 | +msgstr "Compañia" |
133 | + |
134 | +#. module: product_customer_code |
135 | +#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree |
136 | +#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code |
137 | +#: view:product.customer.code:0 |
138 | +#: view:product.product:0 |
139 | +msgid "Product Customer Code" |
140 | +msgstr "Código del Producto por Cliente" |
141 | + |
142 | +#. module: product_customer_code |
143 | +#: model:ir.model,name:product_customer_code.model_product_product |
144 | +#: view:product.customer.code:0 |
145 | +#: field:product.customer.code,product_id:0 |
146 | +msgid "Product" |
147 | +msgstr "Producto" |
148 | + |
149 | +#. module: product_customer_code |
150 | +#: help:product.customer.code,product_code:0 |
151 | +msgid "" |
152 | +"This customer's product code\n" |
153 | +" will be used when searching " |
154 | +"into\n" |
155 | +" a request for quotation." |
156 | +msgstr "" |
157 | +"El código de Producto del cliente\n" |
158 | +" se usará cuando se busque en\n" |
159 | +" una solicitud de cotización." |
160 | + |
161 | +#. module: product_customer_code |
162 | +#: field:product.product,product_customer_code_ids:0 |
163 | +msgid "Customer Codes" |
164 | +msgstr "Código del Cliente" |
165 | + |
166 | +#. module: product_customer_code |
167 | +#: view:product.customer.code:0 |
168 | +msgid "Group By..." |
169 | +msgstr "Agrupar por ..." |
170 | + |
171 | +#. module: product_customer_code |
172 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_user |
173 | +msgid "Product_Customer / User" |
174 | +msgstr "Product_Customer / User" |
175 | + |
176 | +#. module: product_customer_code |
177 | +#: field:product.customer.code,product_name:0 |
178 | +msgid "Customer Product Name" |
179 | +msgstr "Nombre del producto" |
180 | + |
181 | +#. module: product_customer_code |
182 | +#: view:product.customer.code:0 |
183 | +msgid "Partner" |
184 | +msgstr "Partner" |
185 | + |
186 | +#. module: product_customer_code |
187 | +#: model:ir.model,name:product_customer_code.model_product_customer_code |
188 | +msgid "Add manies Code of Customer's" |
189 | +msgstr "Agregar varios códigos de clientes" |
190 | + |
191 | +#. module: product_customer_code |
192 | +#: help:product.customer.code,product_name:0 |
193 | +msgid "" |
194 | +"This customer's product name will\n" |
195 | +" be used when searching into a\n" |
196 | +" request for quotation." |
197 | +msgstr "" |
198 | +"Este nombre de Producto del cliente\n" |
199 | +" se usará cuando se busque en\n" |
200 | +" una solicitud de cotización." |
201 | |
202 | === added file 'product_customer_code/i18n/es_MX.po' |
203 | --- product_customer_code/i18n/es_MX.po 1970-01-01 00:00:00 +0000 |
204 | +++ product_customer_code/i18n/es_MX.po 2014-03-14 15:29:41 +0000 |
205 | @@ -0,0 +1,115 @@ |
206 | +# Translation of OpenERP Server. |
207 | +# This file contains the translation of the following modules: |
208 | +# * product_customer_code |
209 | +# |
210 | +msgid "" |
211 | +msgstr "" |
212 | +"Project-Id-Version: OpenERP Server 6.1\n" |
213 | +"Report-Msgid-Bugs-To: \n" |
214 | +"POT-Creation-Date: 2013-11-07 01:08+0000\n" |
215 | +"PO-Revision-Date: 2013-11-07 05:14+0000\n" |
216 | +"Last-Translator: julio <julio@vauxoo.com>\n" |
217 | +"Language-Team: \n" |
218 | +"MIME-Version: 1.0\n" |
219 | +"Content-Type: text/plain; charset=UTF-8\n" |
220 | +"Content-Transfer-Encoding: 8bit\n" |
221 | +"X-Launchpad-Export-Date: 2013-12-06 06:26+0000\n" |
222 | +"X-Generator: Launchpad (build 16863)\n" |
223 | + |
224 | +#. module: product_customer_code |
225 | +#: field:product.customer.code,partner_id:0 |
226 | +msgid "Customer" |
227 | +msgstr "" |
228 | + |
229 | +#. module: product_customer_code |
230 | +#: view:product.product:0 |
231 | +msgid "Information" |
232 | +msgstr "" |
233 | + |
234 | +#. module: product_customer_code |
235 | +#: view:product.product:0 |
236 | +msgid "Customer Code" |
237 | +msgstr "" |
238 | + |
239 | +#. module: product_customer_code |
240 | +#: sql_constraint:product.customer.code:0 |
241 | +msgid "Product Code of customer must be unique" |
242 | +msgstr "" |
243 | + |
244 | +#. module: product_customer_code |
245 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_manager |
246 | +msgid "Product_Customer / Manager" |
247 | +msgstr "" |
248 | + |
249 | +#. module: product_customer_code |
250 | +#: field:product.customer.code,product_code:0 |
251 | +msgid "Customer Product Code" |
252 | +msgstr "" |
253 | + |
254 | +#. module: product_customer_code |
255 | +#: view:product.customer.code:0 |
256 | +#: field:product.customer.code,company_id:0 |
257 | +msgid "Company" |
258 | +msgstr "" |
259 | + |
260 | +#. module: product_customer_code |
261 | +#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree |
262 | +#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code |
263 | +#: view:product.customer.code:0 |
264 | +#: view:product.product:0 |
265 | +msgid "Product Customer Code" |
266 | +msgstr "" |
267 | + |
268 | +#. module: product_customer_code |
269 | +#: model:ir.model,name:product_customer_code.model_product_product |
270 | +#: view:product.customer.code:0 |
271 | +#: field:product.customer.code,product_id:0 |
272 | +msgid "Product" |
273 | +msgstr "" |
274 | + |
275 | +#. module: product_customer_code |
276 | +#: help:product.customer.code,product_code:0 |
277 | +msgid "" |
278 | +"This customer's product code\n" |
279 | +" will be used when searching " |
280 | +"into\n" |
281 | +" a request for quotation." |
282 | +msgstr "" |
283 | + |
284 | +#. module: product_customer_code |
285 | +#: field:product.product,product_customer_code_ids:0 |
286 | +msgid "Customer Codes" |
287 | +msgstr "" |
288 | + |
289 | +#. module: product_customer_code |
290 | +#: view:product.customer.code:0 |
291 | +msgid "Group By..." |
292 | +msgstr "" |
293 | + |
294 | +#. module: product_customer_code |
295 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_user |
296 | +msgid "Product_Customer / User" |
297 | +msgstr "" |
298 | + |
299 | +#. module: product_customer_code |
300 | +#: field:product.customer.code,product_name:0 |
301 | +msgid "Customer Product Name" |
302 | +msgstr "" |
303 | + |
304 | +#. module: product_customer_code |
305 | +#: view:product.customer.code:0 |
306 | +msgid "Partner" |
307 | +msgstr "" |
308 | + |
309 | +#. module: product_customer_code |
310 | +#: model:ir.model,name:product_customer_code.model_product_customer_code |
311 | +msgid "Add manies Code of Customer's" |
312 | +msgstr "" |
313 | + |
314 | +#. module: product_customer_code |
315 | +#: help:product.customer.code,product_name:0 |
316 | +msgid "" |
317 | +"This customer's product name will\n" |
318 | +" be used when searching into a\n" |
319 | +" request for quotation." |
320 | +msgstr "" |
321 | |
322 | === added file 'product_customer_code/i18n/es_VE.po' |
323 | --- product_customer_code/i18n/es_VE.po 1970-01-01 00:00:00 +0000 |
324 | +++ product_customer_code/i18n/es_VE.po 2014-03-14 15:29:41 +0000 |
325 | @@ -0,0 +1,115 @@ |
326 | +# Translation of OpenERP Server. |
327 | +# This file contains the translation of the following modules: |
328 | +# * product_customer_code |
329 | +# |
330 | +msgid "" |
331 | +msgstr "" |
332 | +"Project-Id-Version: OpenERP Server 6.1\n" |
333 | +"Report-Msgid-Bugs-To: \n" |
334 | +"POT-Creation-Date: 2013-11-07 01:08+0000\n" |
335 | +"PO-Revision-Date: 2013-11-07 05:08+0000\n" |
336 | +"Last-Translator: julio <julio@vauxoo.com>\n" |
337 | +"Language-Team: \n" |
338 | +"MIME-Version: 1.0\n" |
339 | +"Content-Type: text/plain; charset=UTF-8\n" |
340 | +"Content-Transfer-Encoding: 8bit\n" |
341 | +"X-Launchpad-Export-Date: 2013-12-06 06:26+0000\n" |
342 | +"X-Generator: Launchpad (build 16863)\n" |
343 | + |
344 | +#. module: product_customer_code |
345 | +#: field:product.customer.code,partner_id:0 |
346 | +msgid "Customer" |
347 | +msgstr "" |
348 | + |
349 | +#. module: product_customer_code |
350 | +#: view:product.product:0 |
351 | +msgid "Information" |
352 | +msgstr "" |
353 | + |
354 | +#. module: product_customer_code |
355 | +#: view:product.product:0 |
356 | +msgid "Customer Code" |
357 | +msgstr "" |
358 | + |
359 | +#. module: product_customer_code |
360 | +#: sql_constraint:product.customer.code:0 |
361 | +msgid "Product Code of customer must be unique" |
362 | +msgstr "" |
363 | + |
364 | +#. module: product_customer_code |
365 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_manager |
366 | +msgid "Product_Customer / Manager" |
367 | +msgstr "" |
368 | + |
369 | +#. module: product_customer_code |
370 | +#: field:product.customer.code,product_code:0 |
371 | +msgid "Customer Product Code" |
372 | +msgstr "" |
373 | + |
374 | +#. module: product_customer_code |
375 | +#: view:product.customer.code:0 |
376 | +#: field:product.customer.code,company_id:0 |
377 | +msgid "Company" |
378 | +msgstr "" |
379 | + |
380 | +#. module: product_customer_code |
381 | +#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree |
382 | +#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code |
383 | +#: view:product.customer.code:0 |
384 | +#: view:product.product:0 |
385 | +msgid "Product Customer Code" |
386 | +msgstr "" |
387 | + |
388 | +#. module: product_customer_code |
389 | +#: model:ir.model,name:product_customer_code.model_product_product |
390 | +#: view:product.customer.code:0 |
391 | +#: field:product.customer.code,product_id:0 |
392 | +msgid "Product" |
393 | +msgstr "" |
394 | + |
395 | +#. module: product_customer_code |
396 | +#: help:product.customer.code,product_code:0 |
397 | +msgid "" |
398 | +"This customer's product code\n" |
399 | +" will be used when searching " |
400 | +"into\n" |
401 | +" a request for quotation." |
402 | +msgstr "" |
403 | + |
404 | +#. module: product_customer_code |
405 | +#: field:product.product,product_customer_code_ids:0 |
406 | +msgid "Customer Codes" |
407 | +msgstr "" |
408 | + |
409 | +#. module: product_customer_code |
410 | +#: view:product.customer.code:0 |
411 | +msgid "Group By..." |
412 | +msgstr "" |
413 | + |
414 | +#. module: product_customer_code |
415 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_user |
416 | +msgid "Product_Customer / User" |
417 | +msgstr "" |
418 | + |
419 | +#. module: product_customer_code |
420 | +#: field:product.customer.code,product_name:0 |
421 | +msgid "Customer Product Name" |
422 | +msgstr "" |
423 | + |
424 | +#. module: product_customer_code |
425 | +#: view:product.customer.code:0 |
426 | +msgid "Partner" |
427 | +msgstr "" |
428 | + |
429 | +#. module: product_customer_code |
430 | +#: model:ir.model,name:product_customer_code.model_product_customer_code |
431 | +msgid "Add manies Code of Customer's" |
432 | +msgstr "" |
433 | + |
434 | +#. module: product_customer_code |
435 | +#: help:product.customer.code,product_name:0 |
436 | +msgid "" |
437 | +"This customer's product name will\n" |
438 | +" be used when searching into a\n" |
439 | +" request for quotation." |
440 | +msgstr "" |
441 | |
442 | === added file 'product_customer_code/i18n/product_customer_code.pot' |
443 | --- product_customer_code/i18n/product_customer_code.pot 1970-01-01 00:00:00 +0000 |
444 | +++ product_customer_code/i18n/product_customer_code.pot 2014-03-14 15:29:41 +0000 |
445 | @@ -0,0 +1,112 @@ |
446 | +# Translation of OpenERP Server. |
447 | +# This file contains the translation of the following modules: |
448 | +# * product_customer_code |
449 | +# |
450 | +msgid "" |
451 | +msgstr "" |
452 | +"Project-Id-Version: OpenERP Server 7.0\n" |
453 | +"Report-Msgid-Bugs-To: \n" |
454 | +"POT-Creation-Date: 2013-11-07 01:08+0000\n" |
455 | +"PO-Revision-Date: 2013-11-07 01:08+0000\n" |
456 | +"Last-Translator: <>\n" |
457 | +"Language-Team: \n" |
458 | +"MIME-Version: 1.0\n" |
459 | +"Content-Type: text/plain; charset=UTF-8\n" |
460 | +"Content-Transfer-Encoding: \n" |
461 | +"Plural-Forms: \n" |
462 | + |
463 | +#. module: product_customer_code |
464 | +#: field:product.customer.code,partner_id:0 |
465 | +msgid "Customer" |
466 | +msgstr "" |
467 | + |
468 | +#. module: product_customer_code |
469 | +#: view:product.product:0 |
470 | +msgid "Information" |
471 | +msgstr "" |
472 | + |
473 | +#. module: product_customer_code |
474 | +#: view:product.product:0 |
475 | +msgid "Customer Code" |
476 | +msgstr "" |
477 | + |
478 | +#. module: product_customer_code |
479 | +#: sql_constraint:product.customer.code:0 |
480 | +msgid "Product Code of customer must be unique" |
481 | +msgstr "" |
482 | + |
483 | +#. module: product_customer_code |
484 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_manager |
485 | +msgid "Product_Customer / Manager" |
486 | +msgstr "" |
487 | + |
488 | +#. module: product_customer_code |
489 | +#: field:product.customer.code,product_code:0 |
490 | +msgid "Customer Product Code" |
491 | +msgstr "" |
492 | + |
493 | +#. module: product_customer_code |
494 | +#: view:product.customer.code:0 |
495 | +#: field:product.customer.code,company_id:0 |
496 | +msgid "Company" |
497 | +msgstr "" |
498 | + |
499 | +#. module: product_customer_code |
500 | +#: model:ir.actions.act_window,name:product_customer_code.action_product_customer_code_tree |
501 | +#: model:ir.ui.menu,name:product_customer_code.menu_product_customer_code |
502 | +#: view:product.customer.code:0 |
503 | +#: view:product.product:0 |
504 | +msgid "Product Customer Code" |
505 | +msgstr "" |
506 | + |
507 | +#. module: product_customer_code |
508 | +#: model:ir.model,name:product_customer_code.model_product_product |
509 | +#: view:product.customer.code:0 |
510 | +#: field:product.customer.code,product_id:0 |
511 | +msgid "Product" |
512 | +msgstr "" |
513 | + |
514 | +#. module: product_customer_code |
515 | +#: help:product.customer.code,product_code:0 |
516 | +msgid "This customer's product code\n" |
517 | +" will be used when searching into\n" |
518 | +" a request for quotation." |
519 | +msgstr "" |
520 | + |
521 | +#. module: product_customer_code |
522 | +#: field:product.product,product_customer_code_ids:0 |
523 | +msgid "Customer Codes" |
524 | +msgstr "" |
525 | + |
526 | +#. module: product_customer_code |
527 | +#: view:product.customer.code:0 |
528 | +msgid "Group By..." |
529 | +msgstr "" |
530 | + |
531 | +#. module: product_customer_code |
532 | +#: model:res.groups,name:product_customer_code.group_product_customer_code_user |
533 | +msgid "Product_Customer / User" |
534 | +msgstr "" |
535 | + |
536 | +#. module: product_customer_code |
537 | +#: field:product.customer.code,product_name:0 |
538 | +msgid "Customer Product Name" |
539 | +msgstr "" |
540 | + |
541 | +#. module: product_customer_code |
542 | +#: view:product.customer.code:0 |
543 | +msgid "Partner" |
544 | +msgstr "" |
545 | + |
546 | +#. module: product_customer_code |
547 | +#: model:ir.model,name:product_customer_code.model_product_customer_code |
548 | +msgid "Add manies Code of Customer's" |
549 | +msgstr "" |
550 | + |
551 | +#. module: product_customer_code |
552 | +#: help:product.customer.code,product_name:0 |
553 | +msgid "This customer's product name will\n" |
554 | +" be used when searching into a\n" |
555 | +" request for quotation." |
556 | +msgstr "" |
557 | + |
558 | |
559 | === added file 'product_customer_code/product.py' |
560 | --- product_customer_code/product.py 1970-01-01 00:00:00 +0000 |
561 | +++ product_customer_code/product.py 2014-03-14 15:29:41 +0000 |
562 | @@ -0,0 +1,73 @@ |
563 | +# -*- coding: utf-8 -*- |
564 | +########################################################################### |
565 | +# Module Writen to OpenERP, Open Source Management Solution |
566 | +# |
567 | +# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com |
568 | +# All Rights Reserved. |
569 | +# info@vauxoo.com |
570 | +############################################################################ |
571 | +# Coded by: Rodo (rodo@vauxoo.com),Moy (moylop260@vauxoo.com) |
572 | +############################################################################ |
573 | +# |
574 | +# This program is free software: you can redistribute it and/or modify |
575 | +# it under the terms of the GNU Affero General Public License as |
576 | +# published by the Free Software Foundation, either version 3 of the |
577 | +# License, or (at your option) any later version. |
578 | +# |
579 | +# This program is distributed in the hope that it will be useful, |
580 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
581 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
582 | +# GNU Affero General Public License for more details. |
583 | +# |
584 | +# You should have received a copy of the GNU Affero General Public License |
585 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
586 | +# |
587 | +############################################################################## |
588 | +from openerp.osv import orm, fields |
589 | +from openerp.tools.translate import _ |
590 | + |
591 | + |
592 | +class product_product(orm.Model): |
593 | + _inherit = "product.product" |
594 | + |
595 | + _columns = { |
596 | + 'product_customer_code_ids': fields.one2many('product.customer.code', |
597 | + 'product_id', |
598 | + 'Customer Codes'), |
599 | + } |
600 | + |
601 | + def copy(self, cr, uid, id, default=None, context=None): |
602 | + if not default: |
603 | + default = {} |
604 | + default['product_customer_code_ids'] = False |
605 | + res = super(product_product, self).copy( |
606 | + cr, uid, id, default=default, context=context) |
607 | + return res |
608 | + |
609 | + def name_search(self, cr, user, name='', args=None, operator='ilike', |
610 | + context=None, limit=80): |
611 | + res = super(product_product, self).name_search( |
612 | + cr, user, name, args, operator, context, limit) |
613 | + if not context: |
614 | + context = {} |
615 | + product_customer_code_obj = self.pool.get('product.customer.code') |
616 | + if not res: |
617 | + ids = [] |
618 | + partner_id = context.get('partner_id', False) |
619 | + if partner_id: |
620 | + id_prod_code = \ |
621 | + product_customer_code_obj.search(cr, user, |
622 | + [('product_code', |
623 | + '=', name), |
624 | + ('partner_id', '=', |
625 | + partner_id)], |
626 | + limit=limit, |
627 | + context=context) |
628 | + # TODO: Search for product customer name |
629 | + id_prod = id_prod_code and product_customer_code_obj.browse( |
630 | + cr, user, id_prod_code, context=context) or [] |
631 | + for ppu in id_prod: |
632 | + ids.append(ppu.product_id.id) |
633 | + if ids: |
634 | + res = self.name_get(cr, user, ids, context) |
635 | + return res |
636 | |
637 | === added file 'product_customer_code/product_customer_code.py' |
638 | --- product_customer_code/product_customer_code.py 1970-01-01 00:00:00 +0000 |
639 | +++ product_customer_code/product_customer_code.py 2014-03-14 15:29:41 +0000 |
640 | @@ -0,0 +1,67 @@ |
641 | +# -*- coding: utf-8 -*- |
642 | +########################################################################### |
643 | +# Module Writen to OpenERP, Open Source Management Solution |
644 | +# |
645 | +# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com |
646 | +# All Rights Reserved. |
647 | +# info@vauxoo.com |
648 | +############################################################################ |
649 | +# Coded by: Rodo (rodo@vauxoo.com),Moy (moylop260@vauxoo.com) |
650 | +############################################################################ |
651 | +# |
652 | +# This program is free software: you can redistribute it and/or modify |
653 | +# it under the terms of the GNU Affero General Public License as |
654 | +# published by the Free Software Foundation, either version 3 of the |
655 | +# License, or (at your option) any later version. |
656 | +# |
657 | +# This program is distributed in the hope that it will be useful, |
658 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
659 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
660 | +# GNU Affero General Public License for more details. |
661 | +# |
662 | +# You should have received a copy of the GNU Affero General Public License |
663 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
664 | +# |
665 | +############################################################################## |
666 | +from openerp.osv import orm, fields |
667 | +from openerp.tools.translate import _ |
668 | + |
669 | + |
670 | +class product_customer_code(orm.Model): |
671 | + _name = "product.customer.code" |
672 | + _description = "Add manies Code of Customer's" |
673 | + |
674 | + _rec_name = 'product_code' |
675 | + |
676 | + _columns = { |
677 | + 'product_code': fields.char('Customer Product Code', size=64, |
678 | + required=True, |
679 | + help="""This customer's product code |
680 | + will be used when searching into |
681 | + a request for quotation."""), |
682 | + 'product_name': fields.char('Customer Product Name', size=128, |
683 | + help="""This customer's product name will |
684 | + be used when searching into a |
685 | + request for quotation."""), |
686 | + 'product_id': fields.many2one('product.product', 'Product', |
687 | + required=True), |
688 | + 'partner_id': fields.many2one('res.partner', 'Customer', |
689 | + required=True), |
690 | + 'company_id': fields.many2one('res.company', 'Company', |
691 | + required=False), |
692 | + } |
693 | + |
694 | + _defaults = { |
695 | + 'company_id': lambda s, cr, |
696 | + uid, c: s.pool.get('res.company'). |
697 | + _company_default_get(cr, uid, |
698 | + 'product.customer.code', |
699 | + context=c), |
700 | + } |
701 | + |
702 | + _sql_constraints = [ |
703 | + ('unique_code', 'unique(product_code,company_id,partner_id)', |
704 | + 'Product Code of customer must be unique'), |
705 | + ] |
706 | + |
707 | + # TODO: Add index to product_code, partner_id |
708 | |
709 | === added file 'product_customer_code/product_customer_code_view.xml' |
710 | --- product_customer_code/product_customer_code_view.xml 1970-01-01 00:00:00 +0000 |
711 | +++ product_customer_code/product_customer_code_view.xml 2014-03-14 15:29:41 +0000 |
712 | @@ -0,0 +1,61 @@ |
713 | +<?xml version='1.0' encoding='UTF-8'?> |
714 | +<openerp> |
715 | + <data> |
716 | + |
717 | + <record model="ir.ui.view" id="view_product_customer_code_form"> |
718 | + <field name="name">view.product.customer.code.form</field> |
719 | + <field name="model">product.customer.code</field> |
720 | + <field name="arch" type="xml"> |
721 | + <form string="Product Customer Code" version="7.0"> |
722 | + <field name="product_code"/> |
723 | + <field name="partner_id"/> |
724 | + <field name="product_id"/> |
725 | + <field name="company_id" widget="selection" groups="base.group_multi_company"/> |
726 | + </form> |
727 | + </field> |
728 | + </record> |
729 | + |
730 | + <record model="ir.ui.view" id="view_product_customer_code_tree"> |
731 | + <field name="name">view.product.customer.code.tree</field> |
732 | + <field name="model">product.customer.code</field> |
733 | + <field name="arch" type="xml"> |
734 | + <tree string="Product Customer Code"> |
735 | + <field name="product_code"/> |
736 | + <field name="partner_id"/> |
737 | + <field name="company_id"/> |
738 | + <field name="product_id"/> |
739 | + </tree> |
740 | + </field> |
741 | + </record> |
742 | + |
743 | + <record id="action_product_customer_code_tree" model="ir.actions.act_window"> |
744 | + <field name="name">Product Customer Code</field> |
745 | + <field name="res_model">product.customer.code</field> |
746 | + <field name="view_type">form</field> |
747 | + <field name="view_id" ref="view_product_customer_code_tree"/> |
748 | + </record> |
749 | + |
750 | + <record id="view_product_customer_code_search" model="ir.ui.view"> |
751 | + <field name="name">view.product.customer.code.certificate.search</field> |
752 | + <field name="model">product.customer.code</field> |
753 | + <field name="arch" type="xml"> |
754 | + <search string="Product Customer Code"> |
755 | + <field name="product_code"/> |
756 | + <field name="partner_id"/> |
757 | + <field name="company_id"/> |
758 | + <field name="product_id"/> |
759 | + <newline/> |
760 | + <group expand="0" string="Group By..."> |
761 | + <filter string="Company" icon="terp-partner" domain="[]" context="{'group_by':'company_id'}"/> |
762 | + <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/> |
763 | + <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> |
764 | + <separator orientation="vertical"/> |
765 | + </group> |
766 | + </search> |
767 | + </field> |
768 | + </record> |
769 | + |
770 | + <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"/> |
771 | + |
772 | + </data> |
773 | +</openerp> |
774 | |
775 | === added file 'product_customer_code/product_product_view.xml' |
776 | --- product_customer_code/product_product_view.xml 1970-01-01 00:00:00 +0000 |
777 | +++ product_customer_code/product_product_view.xml 2014-03-14 15:29:41 +0000 |
778 | @@ -0,0 +1,31 @@ |
779 | +<?xml version='1.0' encoding='UTF-8'?> |
780 | +<openerp> |
781 | + <data> |
782 | + |
783 | + <record model="ir.ui.view" id="product_normal_form_inh_product_customer_code_01"> |
784 | + <field name="name">product.normal.form.inh.product.customer.code.01</field> |
785 | + <field name="model">product.product</field> |
786 | + <field name="inherit_id" ref="product.product_normal_form_view"/> |
787 | + <field name="arch" type="xml"> |
788 | + <page string="Information" position="after"> |
789 | + <page string="Customer Code"> |
790 | + <field name="product_customer_code_ids" nolabel="1" colspan="4" widget="one2many_list"> |
791 | + <tree string="Product Customer Code" editable="bottom"> |
792 | + <field name="product_code"/> |
793 | + <field name="partner_id"/> |
794 | +<!-- |
795 | + <field name="company_id" widget="selection" groups="base.group_multi_company"/> |
796 | +--> |
797 | + </tree> |
798 | + <form string="Product Customer Code" version="7.0"> |
799 | + <field name="product_code"/> |
800 | + <field name="partner_id"/> |
801 | + </form> |
802 | + </field> |
803 | + </page> |
804 | + </page> |
805 | + </field> |
806 | + </record> |
807 | + |
808 | + </data> |
809 | +</openerp> |
810 | \ No newline at end of file |
811 | |
812 | === added directory 'product_customer_code/security' |
813 | === added file 'product_customer_code/security/ir.model.access.csv' |
814 | --- product_customer_code/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 |
815 | +++ product_customer_code/security/ir.model.access.csv 2014-03-14 15:29:41 +0000 |
816 | @@ -0,0 +1,3 @@ |
817 | +id,name,model_id:id,group_id:id,perm_create,perm_unlink,perm_write,perm_read |
818 | +access_product_customer_code_user,product.customer.code.user,model_product_customer_code,group_product_customer_code_user,0,0,0,1 |
819 | +access_product_customer_code_manager,product.customer.code.manager,model_product_customer_code,group_product_customer_code_manager,1,1,1,1 |
820 | |
821 | === added file 'product_customer_code/security/product_customer_code_security.xml' |
822 | --- product_customer_code/security/product_customer_code_security.xml 1970-01-01 00:00:00 +0000 |
823 | +++ product_customer_code/security/product_customer_code_security.xml 2014-03-14 15:29:41 +0000 |
824 | @@ -0,0 +1,14 @@ |
825 | +<?xml version='1.0' encoding='UTF-8'?> |
826 | +<openerp> |
827 | + <data noupdate="1"> |
828 | + |
829 | + <record id="group_product_customer_code_manager" model="res.groups"> |
830 | + <field name="name">Product_Customer / Manager</field> |
831 | + </record> |
832 | + |
833 | + <record id="group_product_customer_code_user" model="res.groups"> |
834 | + <field name="name">Product_Customer / User</field> |
835 | + </record> |
836 | + |
837 | + </data> |
838 | +</openerp> |
839 | |
840 | === added directory 'product_customer_code/static' |
841 | === added directory 'product_customer_code/static/src' |
842 | === added directory 'product_customer_code/static/src/img' |
843 | === added file 'product_customer_code/static/src/img/screenshot1.png' |
844 | Binary files product_customer_code/static/src/img/screenshot1.png 1970-01-01 00:00:00 +0000 and product_customer_code/static/src/img/screenshot1.png 2014-03-14 15:29:41 +0000 differ |
Thanks, very useful module.
Some little remarks:
'summary' could be added to __openerp__ with something like "Add many Customers' Codes in product"
Module description could be replaced by something like "This module 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"
Every reference to 'osv' should be replaced by 'orm'
A bit of PEP8 changes are needed