Merge lp:~agilebg/openerp-product-attributes/adding_product_category_code_7 into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Lorenzo Battistini
Status: Rejected
Rejected by: Yannick Vaucher @ Camptocamp
Proposed branch: lp:~agilebg/openerp-product-attributes/adding_product_category_code_7
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 213 lines (+177/-0)
7 files modified
product_category_code/AUTHORS.txt (+2/-0)
product_category_code/__init__.py (+22/-0)
product_category_code/__openerp__.py (+38/-0)
product_category_code/i18n/it.po (+32/-0)
product_category_code/i18n/product_category_code.pot (+32/-0)
product_category_code/product.py (+31/-0)
product_category_code/product_view.xml (+20/-0)
To merge this branch: bzr merge lp:~agilebg/openerp-product-attributes/adding_product_category_code_7
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) Disapprove
Joël Grand-Guillaume @ camptocamp code review, no tests Disapprove
Guewen Baconnier @ Camptocamp Abstain
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve
Review via email: mp+176734@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Just quick things I noticed:
- 'auto_install'should be used instead of 'active' in v7.
- Are we creating a module for one field? May be its better to add this into parent module (lp:openerp-product-attributes) if product model is used there.

Just an opinion,
Thanks.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 07/24/2013 09:53 PM, Serpent Consulting Services wrote:
> - Are we creating a module for one field? May be its better to add this into parent module (lp:openerp-product-attributes) if product model is used there.

Do you mean 'product_custom_attributes' module?
In general, I think every module should be as much atomic as possible,
for several reasons: admin may want only that functionality, we can
easily maintain only that functionality, without caring about others not
directly related...

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

I'm agree that this is a very specific question that doesn't need to be merged to the complete module, but it is also not very practical IMHO if it doesn't add so much functionality. It will worth to have it if the module add also an agrupation by this category code in main analysis views that uses product as one axis, and other questions related to this new field (search views and so on).

Regards.

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

> I'm agree that this is a very specific question that doesn't need to be merged
> to the complete module, but it is also not very practical IMHO if it doesn't
> add so much functionality. It will worth to have it if the module add also an
> agrupation by this category code in main analysis views that uses product as
> one axis, and other questions related to this new field (search views and so
> on).
>
> Regards.

I agree.

At least if the module was a dependency for another existing module, I could see some interest to have it, otherwise, I'm not sure that we have a benefit to create small modules for adding 1 fields.

I won't block the MP if other people want to approve though so my voice is: abstain.

review: Abstain
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi,

My opinion here also go in favor of Perdo's arguments. As long as the module "only" add a field, I'm not really in favor of approving that unless it really adds a feature on the field (like grouping on it in analysis view or whatever else).

So my vote goes for disapprove, mainly because we don't want to have hundreds of modules that "just" adds fields.

Regards,

Joël

review: Disapprove (code review, no tests)
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Hi all, this MP can be rejected

review: Disapprove
Revision history for this message
debaetsr (rubendebaets) wrote :

Dear friend!

Here is some information that inspired me a lot, read it please, it may be helpful <http://action.getoffmylawnnow.com/e4jkqv>

Best wishes, ruben

Unmerged revisions

212. By Alex Comba - Agile BG

[FIX] copyright and version

211. By Alex Comba - Agile BG

[FIX] license

210. By Alex Comba - Agile BG

[REF] product_category_code module porting to 7.0

209. By Alex Comba - Agile BG

[ADD] product_category_code module 6.1 version

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'product_category_code'
2=== added file 'product_category_code/AUTHORS.txt'
3--- product_category_code/AUTHORS.txt 1970-01-01 00:00:00 +0000
4+++ product_category_code/AUTHORS.txt 2013-07-24 16:20:38 +0000
5@@ -0,0 +1,2 @@
6+Alex Comba <alex.comba@agilebg.com>
7+Lorenzo Battistini <lorenzo.battistini@agilebg.com>
8
9=== added file 'product_category_code/__init__.py'
10--- product_category_code/__init__.py 1970-01-01 00:00:00 +0000
11+++ product_category_code/__init__.py 2013-07-24 16:20:38 +0000
12@@ -0,0 +1,22 @@
13+# -*- coding: utf-8 -*-
14+##############################################################################
15+#
16+# OpenERP, Open Source Management Solution
17+# Copyright (C) 2011 Domsense s.r.l. (<http://www.domsense.com>).
18+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
19+#
20+# This program is free software: you can redistribute it and/or modify
21+# it under the terms of the GNU Affero General Public License as published
22+# by the Free Software Foundation, either version 3 of the License, or
23+# (at your option) any later version.
24+#
25+# This program is distributed in the hope that it will be useful,
26+# but WITHOUT ANY WARRANTY; without even the implied warranty of
27+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+# GNU Affero General Public License for more details.
29+#
30+# You should have received a copy of the GNU Affero General Public License
31+# along with this program. If not, see <http://www.gnu.org/licenses/>.
32+#
33+##############################################################################
34+import product
35
36=== added file 'product_category_code/__openerp__.py'
37--- product_category_code/__openerp__.py 1970-01-01 00:00:00 +0000
38+++ product_category_code/__openerp__.py 2013-07-24 16:20:38 +0000
39@@ -0,0 +1,38 @@
40+# -*- coding: utf-8 -*-
41+##############################################################################
42+#
43+# OpenERP, Open Source Management Solution
44+# Copyright (C) 2011 Domsense s.r.l. (<http://www.domsense.com>).
45+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
46+#
47+# This program is free software: you can redistribute it and/or modify
48+# it under the terms of the GNU Affero General Public License as published
49+# by the Free Software Foundation, either version 3 of the License, or
50+# (at your option) any later version.
51+#
52+# This program is distributed in the hope that it will be useful,
53+# but WITHOUT ANY WARRANTY; without even the implied warranty of
54+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55+# GNU Affero General Public License for more details.
56+#
57+# You should have received a copy of the GNU Affero General Public License
58+# along with this program. If not, see <http://www.gnu.org/licenses/>.
59+#
60+##############################################################################
61+{
62+ "name": "Product Category Code",
63+ "version": "1.0",
64+ 'category': 'Generic Modules/Inventory Control',
65+ "description": """This module just adds 'code' field to product category""",
66+ "author": "Agile Business Group",
67+ 'website': 'http://www.agilebg.com',
68+ 'license': 'AGPL-3',
69+ "depends": [
70+ "product"
71+ ],
72+ 'data': [
73+ 'product_view.xml',
74+ ],
75+ 'installable': True,
76+ 'active': False,
77+}
78
79=== added directory 'product_category_code/i18n'
80=== added file 'product_category_code/i18n/it.po'
81--- product_category_code/i18n/it.po 1970-01-01 00:00:00 +0000
82+++ product_category_code/i18n/it.po 2013-07-24 16:20:38 +0000
83@@ -0,0 +1,32 @@
84+# Translation of OpenERP Server.
85+# This file contains the translation of the following modules:
86+# * product_category_code
87+#
88+msgid ""
89+msgstr ""
90+"Project-Id-Version: OpenERP Server 6.0.2\n"
91+"Report-Msgid-Bugs-To: support@openerp.com\n"
92+"POT-Creation-Date: 2011-07-05 14:37+0000\n"
93+"PO-Revision-Date: 2011-07-05 16:37+0100\n"
94+"Last-Translator: eLBati <lorenzo.battistini@domsense.com>\n"
95+"Language-Team: \n"
96+"MIME-Version: 1.0\n"
97+"Content-Type: text/plain; charset=UTF-8\n"
98+"Content-Transfer-Encoding: 8bit\n"
99+"Plural-Forms: \n"
100+
101+#. module: product_category_code
102+#: constraint:product.category:0
103+msgid "Error ! You can not create recursive categories."
104+msgstr "Errore! Non si possono creare categorie ricorsive."
105+
106+#. module: product_category_code
107+#: field:product.category,code:0
108+msgid "Code"
109+msgstr "Codice"
110+
111+#. module: product_category_code
112+#: model:ir.model,name:product_category_code.model_product_category
113+msgid "Product Category"
114+msgstr "Categoria prodotto"
115+
116
117=== added file 'product_category_code/i18n/product_category_code.pot'
118--- product_category_code/i18n/product_category_code.pot 1970-01-01 00:00:00 +0000
119+++ product_category_code/i18n/product_category_code.pot 2013-07-24 16:20:38 +0000
120@@ -0,0 +1,32 @@
121+# Translation of OpenERP Server.
122+# This file contains the translation of the following modules:
123+# * product_category_code
124+#
125+msgid ""
126+msgstr ""
127+"Project-Id-Version: OpenERP Server 6.0.2\n"
128+"Report-Msgid-Bugs-To: support@openerp.com\n"
129+"POT-Creation-Date: 2011-07-05 14:36+0000\n"
130+"PO-Revision-Date: 2011-07-05 14:36+0000\n"
131+"Last-Translator: <>\n"
132+"Language-Team: \n"
133+"MIME-Version: 1.0\n"
134+"Content-Type: text/plain; charset=UTF-8\n"
135+"Content-Transfer-Encoding: \n"
136+"Plural-Forms: \n"
137+
138+#. module: product_category_code
139+#: constraint:product.category:0
140+msgid "Error ! You can not create recursive categories."
141+msgstr ""
142+
143+#. module: product_category_code
144+#: field:product.category,code:0
145+msgid "Code"
146+msgstr ""
147+
148+#. module: product_category_code
149+#: model:ir.model,name:product_category_code.model_product_category
150+msgid "Product Category"
151+msgstr ""
152+
153
154=== added file 'product_category_code/product.py'
155--- product_category_code/product.py 1970-01-01 00:00:00 +0000
156+++ product_category_code/product.py 2013-07-24 16:20:38 +0000
157@@ -0,0 +1,31 @@
158+# -*- coding: utf-8 -*-
159+##############################################################################
160+#
161+# OpenERP, Open Source Management Solution
162+# Copyright (C) 2011 Domsense s.r.l. (<http://www.domsense.com>).
163+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
164+#
165+# This program is free software: you can redistribute it and/or modify
166+# it under the terms of the GNU Affero General Public License as published
167+# by the Free Software Foundation, either version 3 of the License, or
168+# (at your option) any later version.
169+#
170+# This program is distributed in the hope that it will be useful,
171+# but WITHOUT ANY WARRANTY; without even the implied warranty of
172+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
173+# GNU Affero General Public License for more details.
174+#
175+# You should have received a copy of the GNU Affero General Public License
176+# along with this program. If not, see <http://www.gnu.org/licenses/>.
177+#
178+##############################################################################
179+
180+from openerp.osv import fields, orm
181+
182+
183+class product_category(orm.Model):
184+ _inherit = "product.category"
185+
186+ _columns = {
187+ 'code': fields.char('Code', size=32),
188+ }
189
190=== added file 'product_category_code/product_view.xml'
191--- product_category_code/product_view.xml 1970-01-01 00:00:00 +0000
192+++ product_category_code/product_view.xml 2013-07-24 16:20:38 +0000
193@@ -0,0 +1,20 @@
194+<?xml version="1.0" encoding="utf-8"?>
195+
196+<openerp>
197+ <data>
198+ <record model="ir.ui.view" id="product_category_form_view_code">
199+ <field name="name">product.category.form.code</field>
200+ <field name="model">product.category</field>
201+ <field name="inherit_id" ref="product.product_category_form_view"/>
202+ <field name="arch" type="xml">
203+ <xpath expr="/form/sheet/div/h1" position="after">
204+ <label for="code" class="oe_edit_only"/>
205+ <h1>
206+ <field name="code"/>
207+ </h1>
208+ </xpath>
209+ </field>
210+ </record>
211+ </data>
212+</openerp>
213+

Subscribers

People subscribed via source and target branches