[MERGE] trunk
[odoo/odoo.git] / addons / stock / product_view.xml
index 7c0d3ac..277ec5b 100644 (file)
             </field>
         </record>
 
-        <record id="view_category_property_form" model="ir.ui.view">
-            <field name="name">product.category.stock.property.form.inherit</field>
-            <field name="model">product.category</field>
-            <field name="inherit_id" ref="account.view_category_property_form"/>
-            <field name="arch" type="xml">
-                <data>
-                    <group name="account_property" position="after">
-                        <group name="account_stock_property" string="Account 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_valuation_account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
-                            <field name="property_stock_journal"/>
-                        </group>
-                    </group>
-                </data>
-            </field>
-        </record>
-
         <record id="view_template_property_form" model="ir.ui.view">
             <field name="name">product.template.stock.property.form.inherit</field>
             <field name="model">product.template</field>
             <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-               <group name="delay" position="inside">
-                       <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}"/>
-               </group>
-               <group name="delay" position="after">
-                       <group name="store" string="Storage Location">
+                <group name="delay" position="inside">
+                    <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}"/>
+                </group>
+                <group name="delay" position="after">
+                    <group name="store" string="Storage Location">
                         <field name="loc_rack"/>
                         <field name="loc_row"/>
-                       <field name="loc_case"/>
-                       </group>
+                        <field name="loc_case"/>
+                    </group>
                 </group>
                 <page position="after" string="Information">
-                    <page string="Properties">
+                    <page string="Properties" name="properties">
                         <group string="Counter-Part Locations Properties" groups="stock.group_locations">
                             <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 string="Accounting Entries">
-                            <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')]"/>
-                        </group>
                     </page>
                 </page>
                 <field name="product_manager" position="attributes" version="7.0">
             </field>
         </record>
 
-        <record id="view_normal_procurement_locations_form" model="ir.ui.view">
-            <field name="name">product.normal.procurement.locations.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//div[@name='buttons']" position="inside">
-                   <button string="Inventory" name="%(action_product_location_tree)d" type="action"  attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations"/>
-                   <button string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user"/>
-                </xpath>
-                <group name="procurement_uom" position="before">
-                    <group name="delay" string="Delays">
-                        <label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
-                        <div attrs="{'invisible':[('type','=','service')]}">
-                            <field name="produce_delay" class="oe_inline"/> days
-                        </div>
-                        <field name="active"/>
-                    </group>
-                </group>
-                <xpath expr="//group[@string='Sale Conditions']" position="inside">
-                    <label for="sale_delay"/>
-                        <div>
-                            <field name="sale_delay" class="oe_inline"/> days
-                        </div>
-                </xpath>
-                <group name="status" position="before" version="7.0">
-                    <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
-                        <label for="qty_available"/>
-                            <div>
-                                <field name="qty_available" class="oe_inline"/>
-                                <button name="%(action_view_change_product_quantity)d" string="⇒ Update"
-                                    type="action"
-                                    class="oe_link"/>
-                            </div>
-                        <label for="incoming_qty"/>
-                        <div>
-                            <field name="incoming_qty" class="oe_inline"/>
-                        </div>
-                        <field name="outgoing_qty" class="oe_inline"/>
-                        <field name="virtual_available" class="oe_inline"/>
-                    </group>
-                    <group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
-                        <field name="track_production" groups="stock.group_production_lot"/>
-                        <field name="track_incoming" groups="stock.group_tracking_lot"/>
-                        <field name="track_outgoing" groups="stock.group_tracking_lot"/>
-                    </group>
-                </group>
-                <group name="status" position="after" version="7.0">
-                    <group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
-                        <field name="loc_rack"/>
-                        <field name="loc_row"/>
-                        <field name="loc_case"/>
-                    </group>
-                </group>
-                <group name="Weights" position="after">
-                     <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>
-                </group>
-                <field name="product_manager" position="attributes" version="7.0">
-                    <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
-                </field>
-            </field>
-        </record>
-
-        <record id="view_product_standard_price_form" model="ir.ui.view">
-            <field name="name">product.product.standard.price.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                <field name="standard_price" position="replace" version="7.0">
-                    <label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
-                    <div groups="base.group_user">
-                        <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
-                        <button name="%(action_view_change_standard_price)d" string="- update"
-                            type="action" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"
-                            class="oe_link" groups="product.group_costing_method"/>
-                    </div>
-                </field>
-            </field>
-        </record>
-
-        <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="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="priority">26</field>
-            <field name="arch" type="xml">
-                <xpath expr="//group[@name='properties']" position="before">
-                    <group groups="stock.group_inventory_valuation">
-                        <separator string="Inventory Valuation" colspan="4"/>
-                        <group colspan="2" col="2">
-                            <field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>
-                        </group>
-                        <group colspan="2" col="2">
-                            <field name="property_stock_account_input" attrs="{'invisible':[('valuation', '!=', 'real_time')]}"
-                                domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
-                            <field name="property_stock_account_output" attrs="{'invisible':[('valuation', '!=', 'real_time')]}"
-                                domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
-                        </group>
-                    </group>
-                    <newline/>
-                </xpath>
-            </field>
-        </record>
-
 
         <record id="action_receive_move" model="ir.actions.act_window">
             <field name="name">Receptions</field>
             <field name="type">ir.actions.act_window</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
-            <field name="domain">[('picking_id.type','=','in')]</field>
+            <field name="domain" eval="[('picking_id.picking_type_id.code','=','outgoing'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
             <field name="view_id" ref="view_move_tree_reception_picking"/>
             <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
-                Click to register a reception for this product. 
+                Click to register a reception for this product.
               </p><p>
                 Here you will find the history of all receptions related to
                 this product, as well as all future receptions you are waiting
             <field name="type">ir.actions.act_window</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
-            <field name="domain">[('picking_id.type','=','out')]</field>
             <field name="view_id" ref="view_move_tree_reception_picking"/>
+            <field name="domain" eval="[('picking_type_id.code','=','outgoing'), ('location_id.usage','=','internal'), ('location_dest_id.usage', '!=', 'internal')]"/>
             <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">