Merge lp:~akretion-team/openerp-product-attributes/product-attributes-port70-codesprint into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Benoit Guillot - http://www.akretion.com
Status: Merged
Merged at revision: 201
Proposed branch: lp:~akretion-team/openerp-product-attributes/product-attributes-port70-codesprint
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 728 lines (+118/-163)
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 (+38/-59)
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 (+12/-8)
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/product-attributes-port70-codesprint
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp Approve
Raphaël Valyi - http://www.akretion.com Approve
Review via email: mp+147962@code.launchpad.net

Description of the change

Migration of the module product_custom_attributes to openerp 7.0

Add the access rules on the models attribute.set, attribute.group, attribute.location, attribute.option and product.attribute.

Fix the views to fit with the version 7.0

To post a comment you must log in.
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Approve (tested).
BUT there are a few things I don't like but fix in the next merge:
https://code.launchpad.net/~akretion-team/openerp-product-attributes/no-stock-dep/+merge/147797

More specifically, I don't like depending even more on the stock module, via the access rules now, so in the other next merge, I fix this by requiring the product.group_product_variant group instead from the product module itself.

So in a word I approve that by then I want my subsequent merge to be applied to move out from the stock dependency at this level.

LGBT pareil -;)
(eh au fait c'est quoi cette merde de LGTM ?)

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

Hello Raphaël,

LGTM is for "Looks Good To Me" ;) Thanks for the question cause it really makes me laugh this morning, I was quite hearing you shouting "C'est quoi cette merde" :) !

For the Merge, it's alright for me, just little remark for Benoit, on line 177 you should have split the line IMO. but well this is not a blocking point !

Have a nice day,

Regards,

Joël

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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-12 15:51:24 +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-12 15:51:24 +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', 'stock'],
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-12 15:51:24 +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-12 15:51:24 +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-12 15:51:24 +0000
194@@ -1,15 +1,14 @@
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@@ -17,15 +16,14 @@
213 <record id="attribute_set_form_view" model="ir.ui.view">
214 <field name="name">attribute.set.form</field>
215 <field name="model">attribute.set</field>
216- <field name="type">form</field>
217 <field name="arch" type="xml">
218- <form string="Attribute Set" col="4">
219- <field name="name" colspan="1"/>
220- <field name="attribute_group_ids" colspan="4" nolabel="1" >
221+ <form string="Attribute Set">
222+ <field name="name" colspan="4"/>
223+ <field name="attribute_group_ids" colspan="4" >
224 <form string="Attribute Groups">
225- <field name="name" colspan="1"/>
226- <field name="sequence" colspan="1"/>
227- <field name="attribute_ids" colspan="6" nolabel="1">
228+ <field name="name" />
229+ <field name="sequence" />
230+ <field name="attribute_ids" colspan="4">
231 <form string="Attribute Location">
232 <field name="attribute_id" />
233 <field name="sequence" />
234@@ -36,7 +34,7 @@
235 </field>
236 </form>
237 <tree string="Attribute Groups">
238- <field name="name" colspan="1"/>
239+ <field name="name" />
240 </tree>
241 </field>
242 </form>
243@@ -46,13 +44,12 @@
244 <record id="attribute_group_form_view" model="ir.ui.view">
245 <field name="name">attribute.group.form</field>
246 <field name="model">attribute.group</field>
247- <field name="type">form</field>
248 <field name="arch" type="xml">
249- <form string="Attribute Group" col="6">
250- <field name="name" colspan="1"/>
251- <field name="sequence" colspan="1"/>
252- <field name="attribute_set_id" colspan="1"/>
253- <field name="attribute_ids" colspan="6" nolabel="1">
254+ <form string="Attribute Group">
255+ <field name="name" />
256+ <field name="sequence" />
257+ <field name="attribute_set_id" />
258+ <field name="attribute_ids" colspan="4" nolabel="1">
259 <form string="Attribute Location">
260 <field name="attribute_id" />
261 <field name="sequence" />
262@@ -68,7 +65,6 @@
263 <record id="attribute_location_form_view" model="ir.ui.view">
264 <field name="name">attribute.location.form</field>
265 <field name="model">attribute.location</field>
266- <field name="type">form</field>
267 <field name="arch" type="xml">
268 <form string="Attribute Location">
269 <field name="attribute_id" />
270@@ -82,20 +78,20 @@
271 <record id="product_attribute_form_view" model="ir.ui.view">
272 <field name="name">product.attribute.form</field>
273 <field name="model">product.attribute</field>
274- <field name="type">form</field>
275 <field name="arch" type="xml">
276- <form string="Product Attribute" col="8">
277- <field name="field_description" colspan="1" on_change="onchange_field_description(field_description, context)"/>
278- <field name="name" colspan="1" attrs="{'readonly':[('create_date', '!=', False)]}" on_change="onchange_name(name, context)"/>
279- <field name="attribute_type" colspan="1"/>
280- <field name="based_on" colspan="1"/>
281- <field name="serialized" colspan="1"/>
282- <field name="size" colspan="1" attrs="{'invisible':[('attribute_type', '!=', 'char')]}"/>
283- <field name="translate" colspan="1" attrs="{'invisible':[('attribute_type', 'not in', ('char', 'text'))]}"/>
284- <field name="option_ids" colspan="8" attrs="{'invisible':[('attribute_type', 'not in', ['select', 'multiselect'])]}" widget="one2many_list" nolabel="1">
285+ <form string="Product Attribute">
286+ <field name="field_description" on_change="onchange_field_description(field_description, context)"/>
287+ <field name="name" attrs="{'readonly':[('create_date', '!=', False)]}" on_change="onchange_name(name, context)"/>
288+ <field name="attribute_type" />
289+ <field name="based_on" />
290+ <field name="serialized" />
291+ <field name="size" attrs="{'invisible':[('attribute_type', '!=', 'char')]}"/>
292+ <field name="translate" attrs="{'invisible':[('attribute_type', 'not in', ('char', 'text'))]}"/>
293+ <newline />
294+ <field name="option_ids" colspan="4" attrs="{'invisible':[('attribute_type', 'not in', ['select', 'multiselect'])]}" widget="one2many_list" nolabel="1">
295 <tree string="Attribute Options" editable="top" >
296- <field name="sequence" colspan="1"/>
297- <field name="name" colspan="7"/>
298+ <field name="sequence" />
299+ <field name="name" />
300 </tree>
301 </field>
302 <field name="create_date" invisible="1"/>
303@@ -106,12 +102,11 @@
304 <record id="attribute_option_form_view" model="ir.ui.view">
305 <field name="name">attribute.option.form</field>
306 <field name="model">attribute.option</field>
307- <field name="type">form</field>
308 <field name="arch" type="xml">
309 <form string="Attribute Option" col="6">
310- <field name="name" colspan="1"/>
311- <field name="sequence" colspan="1"/>
312- <field name="attribute_id" colspan="1"/>
313+ <field name="name" colspan="2"/>
314+ <field name="sequence" colspan="2"/>
315+ <field name="attribute_id" colspan="2"/>
316 </form>
317 </field>
318 </record>
319@@ -119,7 +114,6 @@
320 <record id="attribute_set_tree_view" model="ir.ui.view">
321 <field name="name">attribute.set.tree</field>
322 <field name="model">attribute.set</field>
323- <field name="type">tree</field>
324 <field name="arch" type="xml">
325 <tree string="Attribute Set" >
326 <field name="name" />
327@@ -130,7 +124,6 @@
328 <record id="attribute_group_tree_view" model="ir.ui.view">
329 <field name="name">attribute.group.tree</field>
330 <field name="model">attribute.group</field>
331- <field name="type">tree</field>
332 <field name="arch" type="xml">
333 <tree string="Attribute Group">
334 <field name="name" />
335@@ -143,7 +136,6 @@
336 <record id="attribute_location_tree_view" model="ir.ui.view">
337 <field name="name">attribute.location.tree</field>
338 <field name="model">attribute.location</field>
339- <field name="type">tree</field>
340 <field name="arch" type="xml">
341 <tree string="Attribute Location">
342 <field name="attribute_id" />
343@@ -157,7 +149,6 @@
344 <record id="product_attribute_tree_view" model="ir.ui.view">
345 <field name="name">product.attribute.tree</field>
346 <field name="model">product.attribute</field>
347- <field name="type">tree</field>
348 <field name="arch" type="xml">
349 <tree string="Product Attribute">
350 <field name="name" />
351@@ -169,7 +160,6 @@
352 <record id="prio_attribute_option_tree_view" model="ir.ui.view">
353 <field name="name">attribute.option.tree.prio</field>
354 <field name="model">attribute.option</field>
355- <field name="type">tree</field>
356 <field eval="1" name="priority"/>
357 <field name="arch" type="xml">
358 <tree string="Attribute Option">
359@@ -181,7 +171,6 @@
360 <record id="attribute_option_tree_view" model="ir.ui.view">
361 <field name="name">attribute.option.tree</field>
362 <field name="model">attribute.option</field>
363- <field name="type">tree</field>
364 <field eval="20" name="priority"/>
365 <field name="arch" type="xml">
366 <tree string="Attribute Option">
367@@ -195,10 +184,9 @@
368 <record id="view_attribute_set_search" model="ir.ui.view">
369 <field name="name">attribute.set.list</field>
370 <field name="model">attribute.set</field>
371- <field name="type">search</field>
372 <field name="arch" type="xml">
373 <search string="Search Attribute Sets">
374- <field name="name" select="1"/>
375+ <field name="name"/>
376 </search>
377 </field>
378 </record>
379@@ -206,10 +194,9 @@
380 <record id="view_attribute_group_search" model="ir.ui.view">
381 <field name="name">attribute.group.list</field>
382 <field name="model">attribute.group</field>
383- <field name="type">search</field>
384 <field name="arch" type="xml">
385 <search string="Search Attribute Groups">
386- <field name="name" select="1"/>
387+ <field name="name"/>
388 <field name="attribute_set_id"/>
389 </search>
390 </field>
391@@ -218,10 +205,9 @@
392 <record id="view_attribute_location_search" model="ir.ui.view">
393 <field name="name">attribute.location.list</field>
394 <field name="model">attribute.location</field>
395- <field name="type">search</field>
396 <field name="arch" type="xml">
397 <search string="Search Attribute Locations">
398- <field name="name" select="1"/>
399+ <field name="name"/>
400 <field name="attribute_set_id"/>
401 <field name="attribute_group_id"/>
402 </search>
403@@ -231,10 +217,9 @@
404 <record id="view_product_attribute_search" model="ir.ui.view">
405 <field name="name">product.attribute.list</field>
406 <field name="model">product.attribute</field>
407- <field name="type">search</field>
408 <field name="arch" type="xml">
409 <search string="Search Product Attributes">
410- <field name="name" select="1"/>
411+ <field name="name"/>
412 </search>
413 </field>
414 </record>
415@@ -242,7 +227,6 @@
416 <record id="view_attribute_option_search" model="ir.ui.view">
417 <field name="name">attribute.option.list</field>
418 <field name="model">attribute.option</field>
419- <field name="type">search</field>
420 <field name="arch" type="xml">
421 <search string="Search Attribute Options">
422 <field name="name" />
423@@ -253,10 +237,9 @@
424
425 <record id="attribute_set_form_action" model="ir.actions.act_window">
426 <field name="name">Attribute Sets</field>
427- <field name="type">ir.actions.act_window</field>
428 <field name="res_model">attribute.set</field>
429 <field name="view_type">form</field>
430- <field name="view_mode">tree,form,calendar,graph</field>
431+ <field name="view_mode">tree,form</field>
432 <field name="search_view_id" ref="view_attribute_set_search"/>
433 <field name="context">{"search_default_user_id":uid}</field>
434 <field name="help"></field>
435@@ -264,10 +247,9 @@
436
437 <record id="attribute_group_form_action" model="ir.actions.act_window">
438 <field name="name">Attribute Groups</field>
439- <field name="type">ir.actions.act_window</field>
440 <field name="res_model">attribute.group</field>
441 <field name="view_type">form</field>
442- <field name="view_mode">tree,form,calendar,graph</field>
443+ <field name="view_mode">tree,form</field>
444 <field name="search_view_id" ref="view_attribute_group_search"/>
445 <field name="context">{"search_default_user_id":uid}</field>
446 <field name="help"></field>
447@@ -275,10 +257,9 @@
448
449 <record id="attribute_location_form_action" model="ir.actions.act_window">
450 <field name="name">Attribute Locations</field>
451- <field name="type">ir.actions.act_window</field>
452 <field name="res_model">attribute.location</field>
453 <field name="view_type">form</field>
454- <field name="view_mode">tree,form,calendar,graph</field>
455+ <field name="view_mode">tree,form</field>
456 <field name="search_view_id" ref="view_attribute_location_search"/>
457 <field name="context">{"search_default_user_id":uid}</field>
458 <field name="help"></field>
459@@ -286,10 +267,9 @@
460
461 <record id="product_attribute_form_action" model="ir.actions.act_window">
462 <field name="name">Product Attributes</field>
463- <field name="type">ir.actions.act_window</field>
464 <field name="res_model">product.attribute</field>
465 <field name="view_type">form</field>
466- <field name="view_mode">tree,form,calendar,graph</field>
467+ <field name="view_mode">tree,form</field>
468 <field name="search_view_id" ref="view_product_attribute_search"/>
469 <field name="context">{"search_default_user_id":uid}</field>
470 <field name="help"></field>
471@@ -297,10 +277,9 @@
472
473 <record id="attribute_option_form_action" model="ir.actions.act_window">
474 <field name="name">Attribute Options</field>
475- <field name="type">ir.actions.act_window</field>
476 <field name="res_model">attribute.option</field>
477 <field name="view_type">form</field>
478- <field name="view_mode">tree,form,calendar,graph</field>
479+ <field name="view_mode">tree,form</field>
480 <field name="view_id" ref="attribute_option_tree_view"/>
481 <field name="search_view_id" ref="view_attribute_option_search"/>
482 <field name="context">{"search_default_user_id":uid}</field>
483
484=== modified file 'product_custom_attributes/product_view.xml'
485--- product_custom_attributes/product_view.xml 2012-08-03 14:33:51 +0000
486+++ product_custom_attributes/product_view.xml 2013-02-12 15:51:24 +0000
487@@ -1,47 +1,43 @@
488 <?xml version="1.0" encoding="utf-8"?>
489 <!--
490 product_custom_attributes for OpenERP
491- Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com>
492+ Copyright (C) 2011-2013 Akretion (http://www.akretion.com/)
493+ @author: Benoît GUILLOT <benoit.guillot@akretion.com>
494 The licence is in the file __openerp__.py
495 -->
496
497 <openerp>
498 <data>
499
500- <!-- CREATED VIEW FOR THE OBJECT : product_product -->
501-
502 <record model="ir.ui.view" id="product_product_form_view_set_button">
503 <field name="name">attributes.product.normal.form</field>
504 <field name="model">product.product</field>
505 <field name="inherit_id" ref="product.product_normal_form_view" />
506- <field name="type">form</field>
507 <field name="arch" type="xml">
508- <data>
509- <xpath expr="/form/group/group/field[@name='name']" position="after">
510- <group name="attribute_fields" colspan="2" col="4" >
511- <field name="attribute_set_id" colspan="3"/>
512- <button name="open_attributes" string="Open Attributes" type="object" icon="gtk-ok" colspan="1" attrs="{'invisible':[('attribute_set_id', '=', False)]}"/>
513- </group>
514- </xpath>
515- </data>
516+ <xpath expr="/form/sheet/notebook/page[@string='Information']/group/group/field[@name='variants']/.." position="after">
517+ <group name="attribute_fields">
518+ <field name="attribute_set_id" />
519+ <button name="open_attributes" string="Open Attributes" type="object" icon="gtk-ok" attrs="{'invisible':[('attribute_set_id', '=', False)]}"/>
520+ </group>
521+ </xpath>
522 </field>
523 </record>
524
525 <record model="ir.ui.view" id="product_attributes_form_view">
526 <field name="name">product.attributes.normal.wizard</field>
527 <field name="model">product.product</field>
528- <field name="type">form</field>
529 <field name="arch" type="xml">
530- <form string="Product">
531- <group name="name_set" colspan='4' col='8'>
532+ <form string="Product" version="7.0">
533+ <group name="name_set">
534 <field name="name"/>
535 <field name="attribute_set_id" />
536 </group>
537 <separator string="attributes_placeholder" colspan="4"/>
538- <group colspan='4' col='4'>
539- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
540- <button icon="gtk-ok" name="save_and_close_product_attributes" string="Save and Close" type="object"/>
541- </group>
542+ <footer>
543+ <button name="save_and_close_product_attributes" string="Save and Close" type="object" class="oe_highlight"/>
544+ or
545+ <button special="cancel" string="Cancel" class="oe_link"/>
546+ </footer>
547 </form>
548 </field>
549 </record>
550
551=== added directory 'product_custom_attributes/security'
552=== added file 'product_custom_attributes/security/ir.model.access.csv'
553--- product_custom_attributes/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
554+++ product_custom_attributes/security/ir.model.access.csv 2013-02-12 15:51:24 +0000
555@@ -0,0 +1,16 @@
556+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
557+"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
558+"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
559+"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
560+"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
561+"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
562+"access_product_custom_attributes_attribute_set_manager","product_custom_attributes_attribute_set","product_custom_attributes.model_attribute_set","stock.group_stock_manager",1,1,1,1
563+"access_product_custom_attributes_attribute_group_manager","product_custom_attributes_attribute_group","product_custom_attributes.model_attribute_group","stock.group_stock_manager",1,1,1,1
564+"access_product_custom_attributes_attribute_location_manager","product_custom_attributes_attribute_location","product_custom_attributes.model_attribute_location","stock.group_stock_manager",1,1,1,1
565+"access_product_custom_attributes_product_attribute_manager","product_custom_attributes_product_attribute","product_custom_attributes.model_product_attribute","stock.group_stock_manager",1,1,1,1
566+"access_product_custom_attributes_attribute_option_manager","product_custom_attributes_attribute_option","product_custom_attributes.model_attribute_option","stock.group_stock_manager",1,1,1,1
567+"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
568+"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
569+"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
570+"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
571+"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
572
573=== modified file 'product_custom_attributes/wizard/open_product_by_attribute_set.py'
574--- product_custom_attributes/wizard/open_product_by_attribute_set.py 2012-08-21 14:10:21 +0000
575+++ product_custom_attributes/wizard/open_product_by_attribute_set.py 2013-02-12 15:51:24 +0000
576@@ -1,8 +1,9 @@
577 # -*- encoding: utf-8 -*-
578 ###############################################################################
579 # #
580-# product_custom_attributes for OpenERP #
581-# Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> #
582+# product_custom_attributes for OpenERP #
583+# Copyright (C) 2011-2013 Akretion (http://www.akretion.com/) #
584+# @author: Benoît GUILLOT <benoit.guillot@akretion.com> #
585 # #
586 # This program is free software: you can redistribute it and/or modify #
587 # it under the terms of the GNU Affero General Public License as #
588@@ -28,7 +29,7 @@
589 _description = 'Wizard to open product by attributes set'
590
591 _columns = {
592- 'attribute_set_id':fields.many2one('attribute.set', 'Attribute Set'),
593+ 'attribute_set_id': fields.many2one('attribute.set', 'Attribute Set'),
594 }
595
596 def open_product_by_attribute(self, cr, uid, ids, context=None):
597@@ -44,7 +45,6 @@
598 if context is None:
599 context = {}
600 attribute_set = self.browse(cr, uid, ids[0], context=context).attribute_set_id
601- data = self.read(cr, uid, ids, [], context=context)[0] # XXX used?
602 result = mod_obj.get_object_reference(cr, uid, 'product', 'product_normal_action')
603 id = result[1] if result else False
604 result = act_obj.read(cr, uid, [id], context=context)[0]
605
606=== modified file 'product_custom_attributes/wizard/open_product_by_attribute_set.xml'
607--- product_custom_attributes/wizard/open_product_by_attribute_set.xml 2012-08-03 14:33:51 +0000
608+++ product_custom_attributes/wizard/open_product_by_attribute_set.xml 2013-02-12 15:51:24 +0000
609@@ -1,29 +1,33 @@
610 <?xml version="1.0" encoding="utf-8"?>
611 <!--
612 product_custom_attributes for OpenERP
613- Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com>
614+ Copyright (C) 2011-2013 Akretion (http://www.akretion.com/)
615+ @author: Benoît GUILLOT <benoit.guillot@akretion.com>
616 The licence is in the file __openerp__.py
617 -->
618
619 <openerp>
620 <data>
621
622- <record model="ir.ui.view" id="open_product_by_attribute_set_view">
623+ <record id="open_product_by_attribute_set_view" model="ir.ui.view">
624 <field name="name">open.product.by.attribute.set.view</field>
625 <field name="model">open.product.by.attribute.set</field>
626- <field name="type">form</field>
627 <field name="arch" type="xml">
628- <form string="Open product by attributes set">
629- <field name="attribute_set_id" colspan="4"/>
630- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
631- <button icon="gtk-ok" name="open_product_by_attribute" string="Open Product By attribute" type="object"/>
632+ <form string="Open product by attributes set" version="7.0">
633+ <group>
634+ <field name="attribute_set_id" />
635+ </group>
636+ <footer>
637+ <button name="open_product_by_attribute" string="Open Product By attribute" type="object" class="oe_highlight"/>
638+ or
639+ <button special="cancel" string="Cancel" class="oe_link"/>
640+ </footer>
641 </form>
642 </field>
643 </record>
644
645 <record id="open_product_by_attribute_set" model="ir.actions.act_window">
646 <field name="name">Open Product By Attribute Set</field>
647- <field name="type">ir.actions.act_window</field>
648 <field name="res_model">open.product.by.attribute.set</field>
649 <field name="view_type">form</field>
650 <field name="target">new</field>
651
652=== modified file 'product_gift/__openerp__.py'
653--- product_gift/__openerp__.py 2013-01-21 06:49:06 +0000
654+++ product_gift/__openerp__.py 2013-02-12 15:51:24 +0000
655@@ -22,7 +22,7 @@
656
657 {
658 'name': 'product_gift',
659- 'version': '6.1.0',
660+ 'version': '0.1',
661 'category': 'Generic Modules',
662 'license': 'AGPL-3',
663 'description': """This module adds the gift_wrap feature and gives the possibility to add a gift message on the order or the order line.""",
664
665=== modified file 'product_m2mcategories/__openerp__.py'
666--- product_m2mcategories/__openerp__.py 2013-01-30 13:08:37 +0000
667+++ product_m2mcategories/__openerp__.py 2013-02-12 15:51:24 +0000
668@@ -18,7 +18,7 @@
669
670 {
671 "name" : "Product - Many Categories",
672- "version" : "7.0.0",
673+ "version" : "0.1",
674 "author" : "Sharoon Thomas",
675 "website" : "",
676 "category" : "Generic Modules",
677
678=== modified file 'product_multi_price/__openerp__.py'
679--- product_multi_price/__openerp__.py 2013-01-21 06:49:06 +0000
680+++ product_multi_price/__openerp__.py 2013-02-12 15:51:24 +0000
681@@ -22,7 +22,7 @@
682
683 {
684 'name': 'product_multi_price',
685- 'version': '6.1.0',
686+ 'version': '0.1',
687 'category': 'Generic Modules/Others',
688 'license': 'AGPL-3',
689 'description': """empty""",
690
691=== modified file 'product_prices_on_variant/__openerp__.py'
692--- product_prices_on_variant/__openerp__.py 2013-01-21 06:49:06 +0000
693+++ product_prices_on_variant/__openerp__.py 2013-02-12 15:51:24 +0000
694@@ -23,7 +23,7 @@
695
696 {
697 'name': 'product_prices_on_variant',
698- 'version': '6.1.0',
699+ 'version': '0.1',
700 'category': 'Generic Modules/Others',
701 'license': 'AGPL-3',
702 'description': """
703
704=== modified file 'product_quick_stock_rule/__openerp__.py'
705--- product_quick_stock_rule/__openerp__.py 2013-01-21 06:49:06 +0000
706+++ product_quick_stock_rule/__openerp__.py 2013-02-12 15:51:24 +0000
707@@ -23,7 +23,7 @@
708
709 {
710 'name': 'product_quick_stock_rule',
711- 'version': '6.1.0',
712+ 'version': '0.1',
713 'category': 'Stock',
714 'license': 'AGPL-3',
715 'description': """
716
717=== modified file 'product_sequence/__openerp__.py'
718--- product_sequence/__openerp__.py 2013-02-06 09:12:47 +0000
719+++ product_sequence/__openerp__.py 2013-02-12 15:51:24 +0000
720@@ -22,7 +22,7 @@
721
722 {
723 'name' : 'Product Sequence',
724- 'version' : '7.0',
725+ 'version' : '0.1',
726 "author": "Zikzakmedia SL",
727 "website": "http://www.zikzakmedia.com",
728 "license" : "AGPL-3",

Subscribers

People subscribed via source and target branches