Merge lp:~akretion-team/openerp-product-attributes/openerp-product-attributes-fix-view into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Benoit Guillot - http://www.akretion.com
Status: Merged
Merged at revision: 206
Proposed branch: lp:~akretion-team/openerp-product-attributes/openerp-product-attributes-fix-view
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 23 lines (+7/-5)
1 file modified
product_custom_attributes/product.py (+7/-5)
To merge this branch: bzr merge lp:~akretion-team/openerp-product-attributes/openerp-product-attributes-fix-view
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp code review, no test Approve
Review via email: mp+168461@code.launchpad.net

Description of the change

This branch place each attribute in a group in the generated view. Without that, the labels are not visible in v7.O.

It fixes also the case of the texts fields.

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'product_custom_attributes/product.py'
2--- product_custom_attributes/product.py 2013-02-15 04:36:45 +0000
3+++ product_custom_attributes/product.py 2013-06-10 14:24:35 +0000
4@@ -91,12 +91,14 @@
5 return {'type': 'ir.actions.act_window_close'}
6
7 def _build_attribute_field(self, cr, uid, page, attribute, context=None):
8- parent = page
9+ parent = etree.SubElement(page, 'group', colspan="2", col="4")
10 kwargs = {'name': "%s" % attribute.name}
11- if attribute.ttype == 'many2many':
12- parent = etree.SubElement(page, 'group', colspan="2", col="4")
13- sep = etree.SubElement(parent, 'separator',
14- string="%s" % attribute.field_description, colspan="4")
15+ if attribute.ttype in ['many2many', 'text']:
16+ parent = etree.SubElement(parent, 'group', colspan="2", col="4")
17+ sep = etree.SubElement(parent,
18+ 'separator',
19+ string="%s" % attribute.field_description,
20+ colspan="4")
21 kwargs['nolabel'] = "1"
22 if attribute.ttype in ['many2one', 'many2many']:
23 kwargs['domain'] = "[('attribute_id', '=', %s)]" % attribute.attribute_id.id

Subscribers

People subscribed via source and target branches