~agilebg/openerp-product-attributes/adding_product_pack_7

« back to all changes in this revision

Viewing changes to product_custom_attributes/product.py

  • Committer: Niels Huylebroeck
  • Author(s): Raphaël Valyi
  • Date: 2013-02-20 10:43:38 UTC
  • mfrom: (201.1.3 attrs)
  • Revision ID: nh@agaplan.eu-20130220104338-gm5d4ttbq7isx9bw
[MERGE] product_custom_attributes: 2 attr groups can include the same field. In such case, present the field in the first group where it's found only instead of twice which leads to bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        for group in grp_obj.browse(cr, uid, attribute_group_ids, context=context):
111
111
            page = etree.SubElement(notebook, 'page', string=group.name.capitalize())
112
112
            for attribute in group.attribute_ids:
113
 
                toupdate_fields.append(attribute.name)
114
 
                self._build_attribute_field(cr, uid, page, attribute, context=context)
 
113
                if attribute.name not in toupdate_fields:
 
114
                    toupdate_fields.append(attribute.name)
 
115
                    self._build_attribute_field(cr, uid, page, attribute, context=context)
115
116
        return notebook, toupdate_fields
116
117
 
117
118
    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):