[FIX] product: Even when the product template has more than 1 variant, the default_co...
authorChristophe Matthieu <chm@odoo.com>
Fri, 19 Sep 2014 10:30:57 +0000 (12:30 +0200)
committerChristophe Matthieu <chm@odoo.com>
Fri, 19 Sep 2014 10:30:57 +0000 (12:30 +0200)
addons/product/product_view.xml

index 2c729f4..f8a0684 100644 (file)
@@ -77,8 +77,8 @@
                                     </group>
                                     <group>
                                         <field name="active"/>
-                                        <field name="ean13"/>
-                                        <field name="default_code"/>
+                                        <field name="ean13" attrs="{'invisible': [('is_product_variant', '=', False), ('product_variant_count', '!=', 1)]}"/>
+                                        <field name="default_code" attrs="{'invisible': [('is_product_variant', '=', False), ('product_variant_count', '!=', 1)]}"/>
                                     </group>
                                 </group>
                                 <group colspan="4">