[FIX] Stock : Product Packaging field was missing domain
[odoo/odoo.git] / addons / stock / product_view.xml
index e060ab1..86711ba 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<terp>
+<openerp>
     <data>
 
         <record id="view_category_property_form" model="ir.ui.view">
@@ -8,12 +8,14 @@
             <field name="type">form</field>
             <field name="inherit_id" ref="product.product_category_form_view"/>
             <field name="arch" type="xml">
-                <group string="Properties" position="inside">
-                                       <separator string="Stock Accounting" colspan="4"/>
-                    <field name="property_stock_account_input_categ"/>
-                    <field name="property_stock_account_output_categ"/>
-                    <field name="property_stock_journal"/>
-                </group>
+                <form position="inside">
+                    <group col="2" colspan="2">
+                        <separator string="Accounting Stock Properties" colspan="2"/>
+                        <field name="property_stock_account_input_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
+                        <field name="property_stock_account_output_categ" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
+                        <field name="property_stock_journal"/>
+                    </group>
+                </form>
             </field>
         </record>
 
             <field name="type">form</field>
             <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <page string="Properties" position="inside">
-                    <separator string="Counter-Part Locations" colspan="4"/>
-                    <field name="property_stock_procurement"/>
-                    <field name="property_stock_production"/>
-                    <field name="property_stock_inventory"/>
-                    <separator string="Accounting Entries" colspan="4"/>
-                    <field name="property_stock_account_input"/>
-                    <field name="property_stock_account_output"/>
+                 <page position="after" string="Information">
+                    <page string="Properties">
+                        <separator string="Counter-Part Locations Properties" colspan="4"/>
+                        <field name="property_stock_procurement"/>
+                        <field name="property_stock_production"/>
+                        <field name="property_stock_inventory"/>
+                        <separator string="Accounting Entries" colspan="4"/>
+                        <field name="property_stock_account_input" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
+                        <field name="property_stock_account_output" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
+                    </page>
                 </page>
             </field>
         </record>
 
 
-        <record id="view_normal_property_acc.form" model="ir.ui.view">
+        <record id="view_normal_property_acc_form" model="ir.ui.view">
             <field name="name">product.normal.stock.acc.property.form.inherit</field>
             <field name="model">product.product</field>
             <field name="type">form</field>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="priority">26</field>
             <field name="arch" type="xml">
                 <field name="property_account_expense" position="after">
-                    <field name="property_stock_account_input"/>
-                    <field name="property_stock_account_output"/>
+                    <field name="property_stock_account_output" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
+                    <field name="property_stock_account_input" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
                 </field>
-                       </field>
-               </record>
+            </field>
+        </record>
 
         <record id="view_normal_stock_property_form" model="ir.ui.view">
             <field name="name">product.normal.stock.form.inherit</field>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <group name="status" position="after">
-                                       <group colspan="2" col="2">
-                    <separator string="Stocks" colspan="4"/>
-                                               <field name="qty_available"/>
-                                               <field name="virtual_available"/>
-                                               <field name="incoming_qty"/>
-                                               <field name="outgoing_qty"/>
-                                       </group>
+                    <group colspan="2" col="2">
+                        <separator string="Stocks" colspan="4"/>
+                        <field name="qty_available"/>
+                        <field name="virtual_available"/>
+                    </group>
+                    <group colspan="2" col="2" name="lot" groups="base.group_extended">
+                        <separator string="Lots" colspan="4"/>
+                        <field name="track_production" />
+                        <field name="track_incoming" />
+                        <field name="track_outgoing" />
+                    </group>
                 </group>
             </field>
         </record>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <group name="store" position="after">
-                                       <group col="2" colspan="2" name="store">
-                                               <separator string="Counter-Part Locations" colspan="2"/>
-                                               <field name="property_stock_procurement"/>
-                                               <field name="property_stock_production"/>
-                                               <field name="property_stock_inventory"/>
-                                       </group>
+                    <group col="2" colspan="2" name="store">
+                        <separator string="Counter-Part Locations Properties" colspan="2"/>
+                        <field name="property_stock_procurement"/>
+                        <field name="property_stock_production"/>
+                        <field name="property_stock_inventory"/>
+                    </group>
                 </group>
             </field>
         </record>
 
 
     </data>
-</terp>
+</openerp>