[IMP] Counterpart locations and weights should not be read-only in case of type servi...
authorJosse Colpaert <jco@odoo.com>
Tue, 12 Aug 2014 12:41:08 +0000 (14:41 +0200)
committerJosse Colpaert <jco@odoo.com>
Thu, 21 Aug 2014 15:23:54 +0000 (17:23 +0200)
addons/product/product_view.xml
addons/stock/product_view.xml

index e785e8d..610fe9b 100644 (file)
                                         <field name="state"/>
                                         <field name="product_manager"/>
                                     </group>
-                                    <group name="weight" string="Weights">
-                                        <field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
-                                        <field digits="(14, 3)" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
-                                        <field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
+                                    <group name="weight" string="Weights" attrs="{'invisible':[('type','=','service')]}">
+                                        <field digits="(14, 3)" name="volume"/>
+                                        <field digits="(14, 3)" name="weight"/>
+                                        <field digits="(14, 3)" name="weight_net"/>
                                     </group>
                                 </group>
                             </page>
index df89820..3ef1e74 100644 (file)
                     </group>
                 </group>
                 <group name="weight" position="before">
-                    <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
-                        <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
-                        <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
-                        <field name="property_stock_inventory"  attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>
+                    <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties" attrs="{'invisible':[('type','=','service')]}">
+                        <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
+                        <field name="property_stock_production" domain="[('usage','=','production')]"/>
+                        <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
                     </group>
                 </group>
                 <field name="product_manager" position="attributes">