Merge lp:~akretion-team/openerp-product-attributes/no-stock-dep into lp:~product-core-editors/openerp-product-attributes/7.0
- no-stock-dep
- Merge into 7.0
Status: | Superseded |
---|---|
Proposed branch: | lp:~akretion-team/openerp-product-attributes/no-stock-dep |
Merge into: | lp:~product-core-editors/openerp-product-attributes/7.0 |
Diff against target: |
765 lines (+126/-172) 16 files modified
product_brand/__openerp__.py (+1/-1) product_custom_attributes/__openerp__.py (+7/-10) product_custom_attributes/ir_model_view.xml (+0/-46) product_custom_attributes/product.py (+7/-7) product_custom_attributes/product_attribute.py (+12/-3) product_custom_attributes/product_attribute_view.xml (+45/-66) product_custom_attributes/product_view.xml (+15/-19) product_custom_attributes/security/ir.model.access.csv (+16/-0) product_custom_attributes/wizard/open_product_by_attribute_set.py (+4/-4) product_custom_attributes/wizard/open_product_by_attribute_set.xml (+13/-10) product_gift/__openerp__.py (+1/-1) product_m2mcategories/__openerp__.py (+1/-1) product_multi_price/__openerp__.py (+1/-1) product_prices_on_variant/__openerp__.py (+1/-1) product_quick_stock_rule/__openerp__.py (+1/-1) product_sequence/__openerp__.py (+1/-1) |
To merge this branch: | bzr merge lp:~akretion-team/openerp-product-attributes/no-stock-dep |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Product Core Editors | Pending | ||
Review via email: mp+147797@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-02-14.
Commit message
Description of the change
Hello,
the commits message says it all:
[MIGR][
HOWEVER, before merging, you are advised to first merge this branch:
https:/
That I assumed merged already (I merged it locally) before doing my change.
Regards.
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
Niels Huylebroeck (red15) wrote : | # |
I can't say I like this construct of you using your xpath with a translate call in it.
The xpath always works on the default english language because the view has not been translated yet.
It would be simpler and save a little bit of cpu time to just keep your xpath on line 138/139 of the diff in the English version. Have you ever had an issue with it not matching because of translations ?
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
Can you submit a MP for the other related branch please?
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
> It would be simpler and save a little bit of cpu time to just keep your xpath
> on line 138/139 of the diff in the English version. Have you ever had an issue
> with it not matching because of translations ?
@Niels,
yes absolutely I changed the xpath to use the translated string as it doesn't work on v7.0 when using a language other than English. I'm nit sure if it would be working previously (I guess it was used in English and French and "Information" translates as "Information" in French, so that may be the reason why it has not been detected. Eventually we could try to see if there is a better way to get the English version and apply the translation after, but I'm really not sure it's possible and any simpler.
@Alexandre,
Yes, I'll talk with the Akretion French team to get the 1st merge in. I just uploaded that other branch to let people know what I'm proposing, I'm absolutely aware that the sequence of the merge is to merge the other branch first.
Regards.
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
When you create a new merge proposal, you can choose a prerequisite branch for your proposal. That's convenient because it does not display the diff of the prerequisite.
- 201. By Alexis de Lattre
-
[MRG] Port module product_
custom_ attributes to OpenERP 7
[FIX] module version numbers - 202. By Raphaël Valyi - http://www.akretion.com
-
[MIGR][
openerp- product- attributes] removed the stock module dependency while keeping exactly the same features
dhanapal (dhanapal) wrote : | # |
I tried to install the module 'Product_brand' which you provided in openERP7, but its not getting installed properly.
Can u provide me a solution?
debaetsr (rubendebaets) wrote : | # |
Hello!
Just take a look at that crazy stuff, I'm slightly shocked! Here it is <http://
Hope this helps, ruben
Unmerged revisions
Preview Diff
1 | === modified file 'product_brand/__openerp__.py' |
2 | --- product_brand/__openerp__.py 2013-01-21 06:49:06 +0000 |
3 | +++ product_brand/__openerp__.py 2013-02-11 23:00:37 +0000 |
4 | @@ -26,7 +26,7 @@ |
5 | ################################################################################### |
6 | { |
7 | 'name': 'Product Brand Manager', |
8 | - 'version': '6.1.0', |
9 | + 'version': '0.1', |
10 | 'category': 'Product', |
11 | 'description': """This module allows your user to easily manage product brand. You can define brand, attach it a logo and a description. |
12 | It also allows to attach a partner to a brand. |
13 | |
14 | === modified file 'product_custom_attributes/__openerp__.py' |
15 | --- product_custom_attributes/__openerp__.py 2013-01-21 06:49:06 +0000 |
16 | +++ product_custom_attributes/__openerp__.py 2013-02-11 23:00:37 +0000 |
17 | @@ -23,28 +23,25 @@ |
18 | |
19 | { |
20 | 'name': 'product_custom_attributes', |
21 | - 'version': '6.1.0', |
22 | + 'version': '0.1', |
23 | 'category': 'Generic Modules/Others', |
24 | 'license': 'AGPL-3', |
25 | - 'description': """ |
26 | - This module adds the posibility to easily create custom fields on products. |
27 | - Each product can be linked to an attribute set (such as camera, fridge...) |
28 | - and each attribute set has custom fields (for example you don't need the same field for a frigde and a camera) |
29 | - |
30 | - Need to install the lib unicode2ascii, http://github.com/akretion/unicode2ascii.git |
31 | + 'description': """This module adds the possibility to easily create custom fields on products. |
32 | +Each product can be linked to an attribute set (like camera, fridge...). |
33 | +Each attribute has custom fields (for example, you don't need the same field for a frigde and a camera). |
34 | """, |
35 | 'author': 'Akretion', |
36 | 'website': 'http://www.akretion.com/', |
37 | - 'depends': ['product','stock'], |
38 | + 'depends': ['product'], |
39 | 'init_xml': [], |
40 | 'update_xml': [ |
41 | - 'ir_model_view.xml', |
42 | + 'security/ir.model.access.csv', |
43 | 'product_attribute_view.xml', |
44 | 'product_view.xml', |
45 | 'wizard/open_product_by_attribute_set.xml', |
46 | ], |
47 | 'demo_xml': [], |
48 | - 'installable': False, |
49 | + 'installable': True, |
50 | 'active': False, |
51 | } |
52 | |
53 | |
54 | === removed file 'product_custom_attributes/ir_model_view.xml' |
55 | --- product_custom_attributes/ir_model_view.xml 2012-08-03 14:33:51 +0000 |
56 | +++ product_custom_attributes/ir_model_view.xml 1970-01-01 00:00:00 +0000 |
57 | @@ -1,46 +0,0 @@ |
58 | -<?xml version="1.0" encoding="utf-8"?> |
59 | -<!-- |
60 | - product_custom_attributs for OpenERP |
61 | - Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
62 | - The licence is in the file __openerp__.py |
63 | ---> |
64 | - |
65 | -<openerp> |
66 | - <data> |
67 | - |
68 | - <!-- INHERITED VIEW FOR THE OBJECT : ir_model_fields --> |
69 | - |
70 | -<!-- <record id="ir_model_fields_view_form" model="ir.ui.view">--> |
71 | -<!-- <field name="name">product_custom_attributs.ir_model_fields.view_form</field>--> |
72 | -<!-- <field name="model">ir.model.fields</field>--> |
73 | -<!-- <field name="inherit_id" ref="module_name_to_inherit.view_id" />--> |
74 | -<!-- <field eval="16" name="priority"/>--> |
75 | -<!-- <field name="type">form</field>--> |
76 | -<!-- <field name="arch" type="xml">--> |
77 | -<!-- <data>--> |
78 | -<!-- <field name="field_reference" position="after">--> |
79 | -<!-- </field>--> |
80 | -<!-- </data>--> |
81 | -<!-- </field>--> |
82 | -<!-- </record>--> |
83 | - |
84 | -<!-- <record id="ir_model_fields_view_tree" model="ir.ui.view">--> |
85 | -<!-- <field name="name">product_custom_attributs.ir_model_fields.view_tree</field>--> |
86 | -<!-- <field name="model">ir.model.fields</field>--> |
87 | -<!-- <field name="inherit_id" ref="module_name_to_inherit.view_id" />--> |
88 | -<!-- <field eval="16" name="priority"/>--> |
89 | -<!-- <field name="type">tree</field>--> |
90 | -<!-- <field name="arch" type="xml">--> |
91 | -<!-- <data>--> |
92 | -<!-- <field name="field_reference" position="after">--> |
93 | -<!-- </field>--> |
94 | -<!-- </data>--> |
95 | -<!-- </field>--> |
96 | -<!-- </record>--> |
97 | -<!-- --> |
98 | - |
99 | - |
100 | - |
101 | - |
102 | - </data> |
103 | -</openerp> |
104 | |
105 | === modified file 'product_custom_attributes/product.py' |
106 | --- product_custom_attributes/product.py 2012-11-21 11:48:51 +0000 |
107 | +++ product_custom_attributes/product.py 2013-02-11 23:00:37 +0000 |
108 | @@ -43,10 +43,10 @@ |
109 | } |
110 | |
111 | def _fix_size_bug(self, cr, uid, result, context=None): |
112 | - #When created a field text dynamicaly, its size is limited to 64 in the view. |
113 | - #The bug is fixed but not merged |
114 | - #https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579462-cpa/+merge/128003 |
115 | - #TO remove when the fix will be merged |
116 | + #When created a field text dynamicaly, its size is limited to 64 in the view. |
117 | + #The bug is fixed but not merged |
118 | + #https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-579462-cpa/+merge/128003 |
119 | + #TO remove when the fix will be merged |
120 | for field in result['fields']: |
121 | if result['fields'][field]['type'] == 'text': |
122 | if 'size' in result['fields'][field]: del result['fields'][field]['size'] |
123 | @@ -103,8 +103,8 @@ |
124 | return notebook, toupdate_fields |
125 | |
126 | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): |
127 | - if context==None: |
128 | - context={} |
129 | + if context is None: |
130 | + context = {} |
131 | result = super(product_product, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu) |
132 | if view_type == 'form' and context.get('set_id'): |
133 | eview = etree.fromstring(result['arch']) |
134 | @@ -121,7 +121,7 @@ |
135 | elif context.get('open_product_by_attribute_set'): |
136 | main_page = etree.Element('page', string=_('Custom Attributes')) |
137 | main_page.append(attributes_notebook) |
138 | - info_page = eview.xpath("//page[@string='Information']")[0] |
139 | + info_page = eview.xpath("//page[@string='%s']" % (_('Information'),))[0] |
140 | info_page.addnext(main_page) |
141 | result['arch'] = etree.tostring(eview, pretty_print=True) |
142 | result = self._fix_size_bug(cr, uid, result, context=context) |
143 | |
144 | === modified file 'product_custom_attributes/product_attribute.py' |
145 | --- product_custom_attributes/product_attribute.py 2012-11-21 11:48:51 +0000 |
146 | +++ product_custom_attributes/product_attribute.py 2013-02-11 23:00:37 +0000 |
147 | @@ -60,7 +60,7 @@ |
148 | 'based_on': fields.selection([('product_template','Product Template'), |
149 | ('product_product','Product Variant')], |
150 | 'Based on', required=True), |
151 | - 'option_ids': fields.one2many('attribute.option', 'attribute_id', 'Attribute Option'), |
152 | + 'option_ids': fields.one2many('attribute.option', 'attribute_id', 'Attribute Options'), |
153 | 'create_date': fields.datetime('Created date', readonly=True), |
154 | } |
155 | |
156 | @@ -91,7 +91,7 @@ |
157 | if field_description: |
158 | name = unidecode('x_%s' % field_description.replace(' ', '_').lower()) |
159 | return {'value' : {'name' : name}} |
160 | - |
161 | + |
162 | def onchange_name(self, cr, uid, ids, name, context=None): |
163 | if not name.startswith('x_'): |
164 | name = 'x_%s' % name |
165 | @@ -102,14 +102,23 @@ |
166 | _description = "Attribute Location" |
167 | _order="sequence" |
168 | _inherits = {'product.attribute': 'attribute_id'} |
169 | + |
170 | + |
171 | + def _get_attribute_loc_from_group(self, cr, uid, ids, context=None): |
172 | + return self.pool.get('attribute.location').search(cr, uid, [('attribute_group_id', 'in', ids)], context=context) |
173 | + |
174 | _columns = { |
175 | 'attribute_id': fields.many2one('product.attribute', 'Product Attribute', required=True, ondelete="cascade"), |
176 | - 'attribute_set_id': fields.related('attribute_group_id', 'attribute_set_id', type='many2one', relation='attribute.set', string='Attribute Set', store=True, readonly=True), |
177 | + 'attribute_set_id': fields.related('attribute_group_id', 'attribute_set_id', type='many2one', relation='attribute.set', string='Attribute Set', readonly=True, |
178 | +store={ |
179 | + 'attribute.group': (_get_attribute_loc_from_group, ['attribute_set_id'], 10), |
180 | + }), |
181 | 'attribute_group_id': fields.many2one('attribute.group', 'Attribute Group', required=True), |
182 | 'sequence': fields.integer('Sequence'), |
183 | } |
184 | |
185 | |
186 | + |
187 | class attribute_group(Model): |
188 | _name= "attribute.group" |
189 | _description = "Attribute Group" |
190 | |
191 | === modified file 'product_custom_attributes/product_attribute_view.xml' |
192 | --- product_custom_attributes/product_attribute_view.xml 2012-10-15 15:28:34 +0000 |
193 | +++ product_custom_attributes/product_attribute_view.xml 2013-02-11 23:00:37 +0000 |
194 | @@ -1,31 +1,29 @@ |
195 | <?xml version="1.0" encoding="utf-8"?> |
196 | <!-- |
197 | product_custom_attributes for OpenERP |
198 | - Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
199 | + Copyright (C) 2011-2013 Akretion (http://www.akretion.com/) |
200 | + @author: Benoît GUILLOT <benoit.guillot@akretion.com> |
201 | The licence is in the file __openerp__.py |
202 | --> |
203 | |
204 | <openerp> |
205 | <data> |
206 | |
207 | - <!-- CREATED VIEW FOR THE OBJECT : product_attribute --> |
208 | - |
209 | <menuitem |
210 | - id="menu_attribute_in_config_stock_product" name="Attributes" |
211 | - parent="stock.menu_product_in_config_stock" sequence="20"/> |
212 | + id="menu_attribute_in_config_product" name="Attributes" |
213 | + parent="product.prod_config_main" sequence="20"/> |
214 | |
215 | <record id="attribute_set_form_view" model="ir.ui.view"> |
216 | <field name="name">attribute.set.form</field> |
217 | <field name="model">attribute.set</field> |
218 | - <field name="type">form</field> |
219 | <field name="arch" type="xml"> |
220 | - <form string="Attribute Set" col="4"> |
221 | - <field name="name" colspan="1"/> |
222 | - <field name="attribute_group_ids" colspan="4" nolabel="1" > |
223 | + <form string="Attribute Set"> |
224 | + <field name="name" colspan="4"/> |
225 | + <field name="attribute_group_ids" colspan="4" > |
226 | <form string="Attribute Groups"> |
227 | - <field name="name" colspan="1"/> |
228 | - <field name="sequence" colspan="1"/> |
229 | - <field name="attribute_ids" colspan="6" nolabel="1"> |
230 | + <field name="name" /> |
231 | + <field name="sequence" /> |
232 | + <field name="attribute_ids" colspan="4"> |
233 | <form string="Attribute Location"> |
234 | <field name="attribute_id" /> |
235 | <field name="sequence" /> |
236 | @@ -36,7 +34,7 @@ |
237 | </field> |
238 | </form> |
239 | <tree string="Attribute Groups"> |
240 | - <field name="name" colspan="1"/> |
241 | + <field name="name" /> |
242 | </tree> |
243 | </field> |
244 | </form> |
245 | @@ -46,13 +44,12 @@ |
246 | <record id="attribute_group_form_view" model="ir.ui.view"> |
247 | <field name="name">attribute.group.form</field> |
248 | <field name="model">attribute.group</field> |
249 | - <field name="type">form</field> |
250 | <field name="arch" type="xml"> |
251 | - <form string="Attribute Group" col="6"> |
252 | - <field name="name" colspan="1"/> |
253 | - <field name="sequence" colspan="1"/> |
254 | - <field name="attribute_set_id" colspan="1"/> |
255 | - <field name="attribute_ids" colspan="6" nolabel="1"> |
256 | + <form string="Attribute Group"> |
257 | + <field name="name" /> |
258 | + <field name="sequence" /> |
259 | + <field name="attribute_set_id" /> |
260 | + <field name="attribute_ids" colspan="4" nolabel="1"> |
261 | <form string="Attribute Location"> |
262 | <field name="attribute_id" /> |
263 | <field name="sequence" /> |
264 | @@ -68,7 +65,6 @@ |
265 | <record id="attribute_location_form_view" model="ir.ui.view"> |
266 | <field name="name">attribute.location.form</field> |
267 | <field name="model">attribute.location</field> |
268 | - <field name="type">form</field> |
269 | <field name="arch" type="xml"> |
270 | <form string="Attribute Location"> |
271 | <field name="attribute_id" /> |
272 | @@ -82,20 +78,20 @@ |
273 | <record id="product_attribute_form_view" model="ir.ui.view"> |
274 | <field name="name">product.attribute.form</field> |
275 | <field name="model">product.attribute</field> |
276 | - <field name="type">form</field> |
277 | <field name="arch" type="xml"> |
278 | - <form string="Product Attribute" col="8"> |
279 | - <field name="field_description" colspan="1" on_change="onchange_field_description(field_description, context)"/> |
280 | - <field name="name" colspan="1" attrs="{'readonly':[('create_date', '!=', False)]}" on_change="onchange_name(name, context)"/> |
281 | - <field name="attribute_type" colspan="1"/> |
282 | - <field name="based_on" colspan="1"/> |
283 | - <field name="serialized" colspan="1"/> |
284 | - <field name="size" colspan="1" attrs="{'invisible':[('attribute_type', '!=', 'char')]}"/> |
285 | - <field name="translate" colspan="1" attrs="{'invisible':[('attribute_type', 'not in', ('char', 'text'))]}"/> |
286 | - <field name="option_ids" colspan="8" attrs="{'invisible':[('attribute_type', 'not in', ['select', 'multiselect'])]}" widget="one2many_list" nolabel="1"> |
287 | + <form string="Product Attribute"> |
288 | + <field name="field_description" on_change="onchange_field_description(field_description, context)"/> |
289 | + <field name="name" attrs="{'readonly':[('create_date', '!=', False)]}" on_change="onchange_name(name, context)"/> |
290 | + <field name="attribute_type" /> |
291 | + <field name="based_on" /> |
292 | + <field name="serialized" /> |
293 | + <field name="size" attrs="{'invisible':[('attribute_type', '!=', 'char')]}"/> |
294 | + <field name="translate" attrs="{'invisible':[('attribute_type', 'not in', ('char', 'text'))]}"/> |
295 | + <newline /> |
296 | + <field name="option_ids" colspan="4" attrs="{'invisible':[('attribute_type', 'not in', ['select', 'multiselect'])]}" widget="one2many_list" nolabel="1"> |
297 | <tree string="Attribute Options" editable="top" > |
298 | - <field name="sequence" colspan="1"/> |
299 | - <field name="name" colspan="7"/> |
300 | + <field name="sequence" /> |
301 | + <field name="name" /> |
302 | </tree> |
303 | </field> |
304 | <field name="create_date" invisible="1"/> |
305 | @@ -106,12 +102,11 @@ |
306 | <record id="attribute_option_form_view" model="ir.ui.view"> |
307 | <field name="name">attribute.option.form</field> |
308 | <field name="model">attribute.option</field> |
309 | - <field name="type">form</field> |
310 | <field name="arch" type="xml"> |
311 | <form string="Attribute Option" col="6"> |
312 | - <field name="name" colspan="1"/> |
313 | - <field name="sequence" colspan="1"/> |
314 | - <field name="attribute_id" colspan="1"/> |
315 | + <field name="name" colspan="2"/> |
316 | + <field name="sequence" colspan="2"/> |
317 | + <field name="attribute_id" colspan="2"/> |
318 | </form> |
319 | </field> |
320 | </record> |
321 | @@ -119,7 +114,6 @@ |
322 | <record id="attribute_set_tree_view" model="ir.ui.view"> |
323 | <field name="name">attribute.set.tree</field> |
324 | <field name="model">attribute.set</field> |
325 | - <field name="type">tree</field> |
326 | <field name="arch" type="xml"> |
327 | <tree string="Attribute Set" > |
328 | <field name="name" /> |
329 | @@ -130,7 +124,6 @@ |
330 | <record id="attribute_group_tree_view" model="ir.ui.view"> |
331 | <field name="name">attribute.group.tree</field> |
332 | <field name="model">attribute.group</field> |
333 | - <field name="type">tree</field> |
334 | <field name="arch" type="xml"> |
335 | <tree string="Attribute Group"> |
336 | <field name="name" /> |
337 | @@ -143,7 +136,6 @@ |
338 | <record id="attribute_location_tree_view" model="ir.ui.view"> |
339 | <field name="name">attribute.location.tree</field> |
340 | <field name="model">attribute.location</field> |
341 | - <field name="type">tree</field> |
342 | <field name="arch" type="xml"> |
343 | <tree string="Attribute Location"> |
344 | <field name="attribute_id" /> |
345 | @@ -157,7 +149,6 @@ |
346 | <record id="product_attribute_tree_view" model="ir.ui.view"> |
347 | <field name="name">product.attribute.tree</field> |
348 | <field name="model">product.attribute</field> |
349 | - <field name="type">tree</field> |
350 | <field name="arch" type="xml"> |
351 | <tree string="Product Attribute"> |
352 | <field name="name" /> |
353 | @@ -169,7 +160,6 @@ |
354 | <record id="prio_attribute_option_tree_view" model="ir.ui.view"> |
355 | <field name="name">attribute.option.tree.prio</field> |
356 | <field name="model">attribute.option</field> |
357 | - <field name="type">tree</field> |
358 | <field eval="1" name="priority"/> |
359 | <field name="arch" type="xml"> |
360 | <tree string="Attribute Option"> |
361 | @@ -181,7 +171,6 @@ |
362 | <record id="attribute_option_tree_view" model="ir.ui.view"> |
363 | <field name="name">attribute.option.tree</field> |
364 | <field name="model">attribute.option</field> |
365 | - <field name="type">tree</field> |
366 | <field eval="20" name="priority"/> |
367 | <field name="arch" type="xml"> |
368 | <tree string="Attribute Option"> |
369 | @@ -195,10 +184,9 @@ |
370 | <record id="view_attribute_set_search" model="ir.ui.view"> |
371 | <field name="name">attribute.set.list</field> |
372 | <field name="model">attribute.set</field> |
373 | - <field name="type">search</field> |
374 | <field name="arch" type="xml"> |
375 | <search string="Search Attribute Sets"> |
376 | - <field name="name" select="1"/> |
377 | + <field name="name"/> |
378 | </search> |
379 | </field> |
380 | </record> |
381 | @@ -206,10 +194,9 @@ |
382 | <record id="view_attribute_group_search" model="ir.ui.view"> |
383 | <field name="name">attribute.group.list</field> |
384 | <field name="model">attribute.group</field> |
385 | - <field name="type">search</field> |
386 | <field name="arch" type="xml"> |
387 | <search string="Search Attribute Groups"> |
388 | - <field name="name" select="1"/> |
389 | + <field name="name"/> |
390 | <field name="attribute_set_id"/> |
391 | </search> |
392 | </field> |
393 | @@ -218,10 +205,9 @@ |
394 | <record id="view_attribute_location_search" model="ir.ui.view"> |
395 | <field name="name">attribute.location.list</field> |
396 | <field name="model">attribute.location</field> |
397 | - <field name="type">search</field> |
398 | <field name="arch" type="xml"> |
399 | <search string="Search Attribute Locations"> |
400 | - <field name="name" select="1"/> |
401 | + <field name="name"/> |
402 | <field name="attribute_set_id"/> |
403 | <field name="attribute_group_id"/> |
404 | </search> |
405 | @@ -231,10 +217,9 @@ |
406 | <record id="view_product_attribute_search" model="ir.ui.view"> |
407 | <field name="name">product.attribute.list</field> |
408 | <field name="model">product.attribute</field> |
409 | - <field name="type">search</field> |
410 | <field name="arch" type="xml"> |
411 | <search string="Search Product Attributes"> |
412 | - <field name="name" select="1"/> |
413 | + <field name="name"/> |
414 | </search> |
415 | </field> |
416 | </record> |
417 | @@ -242,7 +227,6 @@ |
418 | <record id="view_attribute_option_search" model="ir.ui.view"> |
419 | <field name="name">attribute.option.list</field> |
420 | <field name="model">attribute.option</field> |
421 | - <field name="type">search</field> |
422 | <field name="arch" type="xml"> |
423 | <search string="Search Attribute Options"> |
424 | <field name="name" /> |
425 | @@ -253,10 +237,9 @@ |
426 | |
427 | <record id="attribute_set_form_action" model="ir.actions.act_window"> |
428 | <field name="name">Attribute Sets</field> |
429 | - <field name="type">ir.actions.act_window</field> |
430 | <field name="res_model">attribute.set</field> |
431 | <field name="view_type">form</field> |
432 | - <field name="view_mode">tree,form,calendar,graph</field> |
433 | + <field name="view_mode">tree,form</field> |
434 | <field name="search_view_id" ref="view_attribute_set_search"/> |
435 | <field name="context">{"search_default_user_id":uid}</field> |
436 | <field name="help"></field> |
437 | @@ -264,10 +247,9 @@ |
438 | |
439 | <record id="attribute_group_form_action" model="ir.actions.act_window"> |
440 | <field name="name">Attribute Groups</field> |
441 | - <field name="type">ir.actions.act_window</field> |
442 | <field name="res_model">attribute.group</field> |
443 | <field name="view_type">form</field> |
444 | - <field name="view_mode">tree,form,calendar,graph</field> |
445 | + <field name="view_mode">tree,form</field> |
446 | <field name="search_view_id" ref="view_attribute_group_search"/> |
447 | <field name="context">{"search_default_user_id":uid}</field> |
448 | <field name="help"></field> |
449 | @@ -275,10 +257,9 @@ |
450 | |
451 | <record id="attribute_location_form_action" model="ir.actions.act_window"> |
452 | <field name="name">Attribute Locations</field> |
453 | - <field name="type">ir.actions.act_window</field> |
454 | <field name="res_model">attribute.location</field> |
455 | <field name="view_type">form</field> |
456 | - <field name="view_mode">tree,form,calendar,graph</field> |
457 | + <field name="view_mode">tree,form</field> |
458 | <field name="search_view_id" ref="view_attribute_location_search"/> |
459 | <field name="context">{"search_default_user_id":uid}</field> |
460 | <field name="help"></field> |
461 | @@ -286,10 +267,9 @@ |
462 | |
463 | <record id="product_attribute_form_action" model="ir.actions.act_window"> |
464 | <field name="name">Product Attributes</field> |
465 | - <field name="type">ir.actions.act_window</field> |
466 | <field name="res_model">product.attribute</field> |
467 | <field name="view_type">form</field> |
468 | - <field name="view_mode">tree,form,calendar,graph</field> |
469 | + <field name="view_mode">tree,form</field> |
470 | <field name="search_view_id" ref="view_product_attribute_search"/> |
471 | <field name="context">{"search_default_user_id":uid}</field> |
472 | <field name="help"></field> |
473 | @@ -297,10 +277,9 @@ |
474 | |
475 | <record id="attribute_option_form_action" model="ir.actions.act_window"> |
476 | <field name="name">Attribute Options</field> |
477 | - <field name="type">ir.actions.act_window</field> |
478 | <field name="res_model">attribute.option</field> |
479 | <field name="view_type">form</field> |
480 | - <field name="view_mode">tree,form,calendar,graph</field> |
481 | + <field name="view_mode">tree,form</field> |
482 | <field name="view_id" ref="attribute_option_tree_view"/> |
483 | <field name="search_view_id" ref="view_attribute_option_search"/> |
484 | <field name="context">{"search_default_user_id":uid}</field> |
485 | @@ -309,19 +288,19 @@ |
486 | |
487 | <menuitem |
488 | action="attribute_set_form_action" id="menu_attribute_set_action" |
489 | - parent="product_custom_attributes.menu_attribute_in_config_stock_product" sequence="1"/> |
490 | + parent="product_custom_attributes.menu_attribute_in_config_product" sequence="1"/> |
491 | <menuitem |
492 | action="attribute_group_form_action" id="menu_attribute_group_action" |
493 | - parent="product_custom_attributes.menu_attribute_in_config_stock_product" sequence="2"/> |
494 | + parent="product_custom_attributes.menu_attribute_in_config_product" sequence="2"/> |
495 | <menuitem |
496 | action="attribute_location_form_action" id="menu_attribute_location_action" |
497 | - parent="product_custom_attributes.menu_attribute_in_config_stock_product" sequence="3"/> |
498 | + parent="product_custom_attributes.menu_attribute_in_config_product" sequence="3"/> |
499 | <menuitem |
500 | action="product_attribute_form_action" id="menu_product_attribute_action" |
501 | - parent="product_custom_attributes.menu_attribute_in_config_stock_product" sequence="4"/> |
502 | + parent="product_custom_attributes.menu_attribute_in_config_product" sequence="4"/> |
503 | <menuitem |
504 | action="attribute_option_form_action" id="menu_attribute_option_action" |
505 | - parent="product_custom_attributes.menu_attribute_in_config_stock_product" sequence="5"/> |
506 | + parent="product_custom_attributes.menu_attribute_in_config_product" sequence="5"/> |
507 | |
508 | </data> |
509 | </openerp> |
510 | |
511 | === modified file 'product_custom_attributes/product_view.xml' |
512 | --- product_custom_attributes/product_view.xml 2012-08-03 14:33:51 +0000 |
513 | +++ product_custom_attributes/product_view.xml 2013-02-11 23:00:37 +0000 |
514 | @@ -1,47 +1,43 @@ |
515 | <?xml version="1.0" encoding="utf-8"?> |
516 | <!-- |
517 | product_custom_attributes for OpenERP |
518 | - Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
519 | + Copyright (C) 2011-2013 Akretion (http://www.akretion.com/) |
520 | + @author: Benoît GUILLOT <benoit.guillot@akretion.com> |
521 | The licence is in the file __openerp__.py |
522 | --> |
523 | |
524 | <openerp> |
525 | <data> |
526 | |
527 | - <!-- CREATED VIEW FOR THE OBJECT : product_product --> |
528 | - |
529 | <record model="ir.ui.view" id="product_product_form_view_set_button"> |
530 | <field name="name">attributes.product.normal.form</field> |
531 | <field name="model">product.product</field> |
532 | <field name="inherit_id" ref="product.product_normal_form_view" /> |
533 | - <field name="type">form</field> |
534 | <field name="arch" type="xml"> |
535 | - <data> |
536 | - <xpath expr="/form/group/group/field[@name='name']" position="after"> |
537 | - <group name="attribute_fields" colspan="2" col="4" > |
538 | - <field name="attribute_set_id" colspan="3"/> |
539 | - <button name="open_attributes" string="Open Attributes" type="object" icon="gtk-ok" colspan="1" attrs="{'invisible':[('attribute_set_id', '=', False)]}"/> |
540 | - </group> |
541 | - </xpath> |
542 | - </data> |
543 | + <xpath expr="/form/sheet/notebook/page[@string='Information']/group/group/field[@name='variants']/.." position="after"> |
544 | + <group name="attribute_fields"> |
545 | + <field name="attribute_set_id" /> |
546 | + <button name="open_attributes" string="Open Attributes" type="object" icon="gtk-ok" attrs="{'invisible':[('attribute_set_id', '=', False)]}"/> |
547 | + </group> |
548 | + </xpath> |
549 | </field> |
550 | </record> |
551 | |
552 | <record model="ir.ui.view" id="product_attributes_form_view"> |
553 | <field name="name">product.attributes.normal.wizard</field> |
554 | <field name="model">product.product</field> |
555 | - <field name="type">form</field> |
556 | <field name="arch" type="xml"> |
557 | - <form string="Product"> |
558 | - <group name="name_set" colspan='4' col='8'> |
559 | + <form string="Product" version="7.0"> |
560 | + <group name="name_set"> |
561 | <field name="name"/> |
562 | <field name="attribute_set_id" /> |
563 | </group> |
564 | <separator string="attributes_placeholder" colspan="4"/> |
565 | - <group colspan='4' col='4'> |
566 | - <button icon="gtk-cancel" special="cancel" string="Cancel"/> |
567 | - <button icon="gtk-ok" name="save_and_close_product_attributes" string="Save and Close" type="object"/> |
568 | - </group> |
569 | + <footer> |
570 | + <button name="save_and_close_product_attributes" string="Save and Close" type="object" class="oe_highlight"/> |
571 | + or |
572 | + <button special="cancel" string="Cancel" class="oe_link"/> |
573 | + </footer> |
574 | </form> |
575 | </field> |
576 | </record> |
577 | |
578 | === added directory 'product_custom_attributes/security' |
579 | === added file 'product_custom_attributes/security/ir.model.access.csv' |
580 | --- product_custom_attributes/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 |
581 | +++ product_custom_attributes/security/ir.model.access.csv 2013-02-11 23:00:37 +0000 |
582 | @@ -0,0 +1,16 @@ |
583 | +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
584 | +"access_product_custom_attributes_attribute_set_salemanager","product_custom_attributes_attribute_set","product_custom_attributes.model_attribute_set","base.group_sale_manager",1,1,1,1 |
585 | +"access_product_custom_attributes_attribute_group_salemanager","product_custom_attributes_attribute_group","product_custom_attributes.model_attribute_group","base.group_sale_manager",1,1,1,1 |
586 | +"access_product_custom_attributes_attribute_location_salemanager","product_custom_attributes_attribute_location","product_custom_attributes.model_attribute_location","base.group_sale_manager",1,1,1,1 |
587 | +"access_product_custom_attributes_product_attribute_salemanager","product_custom_attributes_product_attribute","product_custom_attributes.model_product_attribute","base.group_sale_manager",1,1,1,1 |
588 | +"access_product_custom_attributes_attribute_option_salemanager","product_custom_attributes_attribute_option","product_custom_attributes.model_attribute_option","base.group_sale_manager",1,1,1,1 |
589 | +"access_product_custom_attributes_attribute_set_manager","product_custom_attributes_attribute_set","product_custom_attributes.model_attribute_set","product.group_product_variant",1,1,1,1 |
590 | +"access_product_custom_attributes_attribute_group_manager","product_custom_attributes_attribute_group","product_custom_attributes.model_attribute_group","product.group_product_variant",1,1,1,1 |
591 | +"access_product_custom_attributes_attribute_location_manager","product_custom_attributes_attribute_location","product_custom_attributes.model_attribute_location","product.group_product_variant",1,1,1,1 |
592 | +"access_product_custom_attributes_product_attribute_manager","product_custom_attributes_product_attribute","product_custom_attributes.model_product_attribute","product.group_product_variant",1,1,1,1 |
593 | +"access_product_custom_attributes_attribute_option_manager","product_custom_attributes_attribute_option","product_custom_attributes.model_attribute_option","product.group_product_variant",1,1,1,1 |
594 | +"access_product_custom_attributes_attribute_set_user","product_custom_attributes_attribute_set","product_custom_attributes.model_attribute_set","base.group_user",1,0,0,0 |
595 | +"access_product_custom_attributes_attribute_group_user","product_custom_attributes_attribute_group","product_custom_attributes.model_attribute_group","base.group_user",1,0,0,0 |
596 | +"access_product_custom_attributes_attribute_location_user","product_custom_attributes_attribute_location","product_custom_attributes.model_attribute_location","base.group_user",1,0,0,0 |
597 | +"access_product_custom_attributes_product_attribute_user","product_custom_attributes_product_attribute","product_custom_attributes.model_product_attribute","base.group_user",1,0,0,0 |
598 | +"access_product_custom_attributes_attribute_option_user","product_custom_attributes_attribute_option","product_custom_attributes.model_attribute_option","base.group_user",1,0,0,0 |
599 | |
600 | === modified file 'product_custom_attributes/wizard/open_product_by_attribute_set.py' |
601 | --- product_custom_attributes/wizard/open_product_by_attribute_set.py 2012-08-21 14:10:21 +0000 |
602 | +++ product_custom_attributes/wizard/open_product_by_attribute_set.py 2013-02-11 23:00:37 +0000 |
603 | @@ -1,8 +1,9 @@ |
604 | # -*- encoding: utf-8 -*- |
605 | ############################################################################### |
606 | # # |
607 | -# product_custom_attributes for OpenERP # |
608 | -# Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> # |
609 | +# product_custom_attributes for OpenERP # |
610 | +# Copyright (C) 2011-2013 Akretion (http://www.akretion.com/) # |
611 | +# @author: Benoît GUILLOT <benoit.guillot@akretion.com> # |
612 | # # |
613 | # This program is free software: you can redistribute it and/or modify # |
614 | # it under the terms of the GNU Affero General Public License as # |
615 | @@ -28,7 +29,7 @@ |
616 | _description = 'Wizard to open product by attributes set' |
617 | |
618 | _columns = { |
619 | - 'attribute_set_id':fields.many2one('attribute.set', 'Attribute Set'), |
620 | + 'attribute_set_id': fields.many2one('attribute.set', 'Attribute Set'), |
621 | } |
622 | |
623 | def open_product_by_attribute(self, cr, uid, ids, context=None): |
624 | @@ -44,7 +45,6 @@ |
625 | if context is None: |
626 | context = {} |
627 | attribute_set = self.browse(cr, uid, ids[0], context=context).attribute_set_id |
628 | - data = self.read(cr, uid, ids, [], context=context)[0] # XXX used? |
629 | result = mod_obj.get_object_reference(cr, uid, 'product', 'product_normal_action') |
630 | id = result[1] if result else False |
631 | result = act_obj.read(cr, uid, [id], context=context)[0] |
632 | |
633 | === modified file 'product_custom_attributes/wizard/open_product_by_attribute_set.xml' |
634 | --- product_custom_attributes/wizard/open_product_by_attribute_set.xml 2012-08-03 14:33:51 +0000 |
635 | +++ product_custom_attributes/wizard/open_product_by_attribute_set.xml 2013-02-11 23:00:37 +0000 |
636 | @@ -1,29 +1,33 @@ |
637 | <?xml version="1.0" encoding="utf-8"?> |
638 | <!-- |
639 | product_custom_attributes for OpenERP |
640 | - Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
641 | + Copyright (C) 2011-2013 Akretion (http://www.akretion.com/) |
642 | + @author: Benoît GUILLOT <benoit.guillot@akretion.com> |
643 | The licence is in the file __openerp__.py |
644 | --> |
645 | |
646 | <openerp> |
647 | <data> |
648 | |
649 | - <record model="ir.ui.view" id="open_product_by_attribute_set_view"> |
650 | + <record id="open_product_by_attribute_set_view" model="ir.ui.view"> |
651 | <field name="name">open.product.by.attribute.set.view</field> |
652 | <field name="model">open.product.by.attribute.set</field> |
653 | - <field name="type">form</field> |
654 | <field name="arch" type="xml"> |
655 | - <form string="Open product by attributes set"> |
656 | - <field name="attribute_set_id" colspan="4"/> |
657 | - <button icon="gtk-cancel" special="cancel" string="Cancel"/> |
658 | - <button icon="gtk-ok" name="open_product_by_attribute" string="Open Product By attribute" type="object"/> |
659 | + <form string="Open product by attributes set" version="7.0"> |
660 | + <group> |
661 | + <field name="attribute_set_id" /> |
662 | + </group> |
663 | + <footer> |
664 | + <button name="open_product_by_attribute" string="Open Product By attribute" type="object" class="oe_highlight"/> |
665 | + or |
666 | + <button special="cancel" string="Cancel" class="oe_link"/> |
667 | + </footer> |
668 | </form> |
669 | </field> |
670 | </record> |
671 | |
672 | <record id="open_product_by_attribute_set" model="ir.actions.act_window"> |
673 | <field name="name">Open Product By Attribute Set</field> |
674 | - <field name="type">ir.actions.act_window</field> |
675 | <field name="res_model">open.product.by.attribute.set</field> |
676 | <field name="view_type">form</field> |
677 | <field name="target">new</field> |
678 | @@ -31,8 +35,7 @@ |
679 | <field name="help"></field> |
680 | </record> |
681 | |
682 | - <menuitem action="open_product_by_attribute_set" id="open_product_wizard" parent="stock.menu_stock_product" sequence="20"/> |
683 | - |
684 | + <menuitem action="open_product_by_attribute_set" id="open_product_wizard" parent="base.menu_product" sequence="20"/> |
685 | |
686 | </data> |
687 | </openerp> |
688 | |
689 | === modified file 'product_gift/__openerp__.py' |
690 | --- product_gift/__openerp__.py 2013-01-21 06:49:06 +0000 |
691 | +++ product_gift/__openerp__.py 2013-02-11 23:00:37 +0000 |
692 | @@ -22,7 +22,7 @@ |
693 | |
694 | { |
695 | 'name': 'product_gift', |
696 | - 'version': '6.1.0', |
697 | + 'version': '0.1', |
698 | 'category': 'Generic Modules', |
699 | 'license': 'AGPL-3', |
700 | 'description': """This module adds the gift_wrap feature and gives the possibility to add a gift message on the order or the order line.""", |
701 | |
702 | === modified file 'product_m2mcategories/__openerp__.py' |
703 | --- product_m2mcategories/__openerp__.py 2013-01-30 13:08:37 +0000 |
704 | +++ product_m2mcategories/__openerp__.py 2013-02-11 23:00:37 +0000 |
705 | @@ -18,7 +18,7 @@ |
706 | |
707 | { |
708 | "name" : "Product - Many Categories", |
709 | - "version" : "7.0.0", |
710 | + "version" : "0.1", |
711 | "author" : "Sharoon Thomas", |
712 | "website" : "", |
713 | "category" : "Generic Modules", |
714 | |
715 | === modified file 'product_multi_price/__openerp__.py' |
716 | --- product_multi_price/__openerp__.py 2013-01-21 06:49:06 +0000 |
717 | +++ product_multi_price/__openerp__.py 2013-02-11 23:00:37 +0000 |
718 | @@ -22,7 +22,7 @@ |
719 | |
720 | { |
721 | 'name': 'product_multi_price', |
722 | - 'version': '6.1.0', |
723 | + 'version': '0.1', |
724 | 'category': 'Generic Modules/Others', |
725 | 'license': 'AGPL-3', |
726 | 'description': """empty""", |
727 | |
728 | === modified file 'product_prices_on_variant/__openerp__.py' |
729 | --- product_prices_on_variant/__openerp__.py 2013-01-21 06:49:06 +0000 |
730 | +++ product_prices_on_variant/__openerp__.py 2013-02-11 23:00:37 +0000 |
731 | @@ -23,7 +23,7 @@ |
732 | |
733 | { |
734 | 'name': 'product_prices_on_variant', |
735 | - 'version': '6.1.0', |
736 | + 'version': '0.1', |
737 | 'category': 'Generic Modules/Others', |
738 | 'license': 'AGPL-3', |
739 | 'description': """ |
740 | |
741 | === modified file 'product_quick_stock_rule/__openerp__.py' |
742 | --- product_quick_stock_rule/__openerp__.py 2013-01-21 06:49:06 +0000 |
743 | +++ product_quick_stock_rule/__openerp__.py 2013-02-11 23:00:37 +0000 |
744 | @@ -23,7 +23,7 @@ |
745 | |
746 | { |
747 | 'name': 'product_quick_stock_rule', |
748 | - 'version': '6.1.0', |
749 | + 'version': '0.1', |
750 | 'category': 'Stock', |
751 | 'license': 'AGPL-3', |
752 | 'description': """ |
753 | |
754 | === modified file 'product_sequence/__openerp__.py' |
755 | --- product_sequence/__openerp__.py 2013-02-06 09:12:47 +0000 |
756 | +++ product_sequence/__openerp__.py 2013-02-11 23:00:37 +0000 |
757 | @@ -22,7 +22,7 @@ |
758 | |
759 | { |
760 | 'name' : 'Product Sequence', |
761 | - 'version' : '7.0', |
762 | + 'version' : '0.1', |
763 | "author": "Zikzakmedia SL", |
764 | "website": "http://www.zikzakmedia.com", |
765 | "license" : "AGPL-3", |
RATIONALE OF THE CHANGE:
you may want to have product with custom attributes without needing the stock module. Especially in v7.0 where you can now even have the sale module without the stock module.
This is exactly the case I have with our last customer and I see no reason to force to have the stock dependency at this level. If really you want to have these menus inside the stock menus, you could very well have a little extra XML only stock product attributes module. If that's really important I can provide such module, but I should say, from the code I changed I don't think the place where these menus live are so important to justify and extra module.