[IMP] product,stock: if product type service then redonly some fields
authorsbh (Open ERP) <sbh@tinyerp.com>
Thu, 8 Jul 2010 12:46:18 +0000 (18:16 +0530)
committersbh (Open ERP) <sbh@tinyerp.com>
Thu, 8 Jul 2010 12:46:18 +0000 (18:16 +0530)
bzr revid: sbh@tinyerp.com-20100708124618-8k3c6abuy1d57g1d

addons/procurement/process/procurement_process.xml
addons/product/product_view.xml
addons/stock/product_view.xml

index e5b94bb..e12c97b 100644 (file)
@@ -3,7 +3,7 @@
     <data>
 
         <!--
-            Process
+           Process Node from where the Procurement flow starts
         -->
 
         <record id="process_process_procurementprocess0" model="process.process">
             <field name="model_id" ref="procurement.model_procurement_order"/>
             <field eval="1" name="active"/>
         </record>
-
-        <!--
-            Process Node
-        -->
-
         
     </data>
 </openerp>
index b5f48ef..e58987c 100644 (file)
                             </group>
                             <group colspan="2" col="2" name="store">
                                 <separator string="Storage Localisation" colspan="2"/>
-                                <field name="loc_rack"/>
-                                <field name="loc_row"/>
-                                <field name="loc_case"/>
+                                <field name="loc_rack" attrs="{'readonly':[('type','=','service')]}" />
+                                <field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
+                                <field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
                             </group>
 
                             <group colspan="2" col="2" name="misc" groups="base.group_extended">
index 1d8db4f..01214ba 100644 (file)
                 <group name="store" position="after">
                     <group col="2" colspan="2" name="store" groups="base.group_extended">
                         <separator string="Counter-Part Locations Properties" colspan="2"/>
-                        <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
-                        <field name="property_stock_production"  domain="[('usage','=','production')]"/>
-                        <field name="property_stock_inventory"  domain="[('usage','=','inventory')]"/>
+                        <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>
                 </group>
             </field>