Skip to content

Commit

Permalink
[MERGE] product_custom_attributes: 2 attr groups can include the same…
Browse files Browse the repository at this point in the history
… field. In such case, present the field in the first group where it's found only instead of twice which leads to bugs
  • Loading branch information
rvalyi authored and red15 committed Feb 20, 2013
2 parents 191d370 + 6e1c16d commit 660adb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions product_custom_attributes/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def _build_attributes_notebook(self, cr, uid, attribute_group_ids, context=None)
for group in grp_obj.browse(cr, uid, attribute_group_ids, context=context):
page = etree.SubElement(notebook, 'page', string=group.name.capitalize())
for attribute in group.attribute_ids:
toupdate_fields.append(attribute.name)
self._build_attribute_field(cr, uid, page, attribute, context=context)
if attribute.name not in toupdate_fields:
toupdate_fields.append(attribute.name)
self._build_attribute_field(cr, uid, page, attribute, context=context)
return notebook, toupdate_fields

def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
Expand Down

0 comments on commit 660adb0

Please sign in to comment.