<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="action_partial_picking" model="ir.actions.act_window">
            <field name="name">Process Picking</field>
            <field name="res_model">stock.partial.picking</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <!-- this view of stock.partial.picking wizard is dedicated to internal picking. The fields_view_get is ovveridden in order to change the label of the process button and the separator. -->
        <record id="stock_partial_picking_form" model="ir.ui.view">
            <field name="name">stock.partial.picking.form</field>
            <field name="model">stock.partial.picking</field>
            <field name="arch" type="xml">
                <form string="Stock partial Picking" version="7.0">
                    <field name="hide_tracking" invisible="1"/>
                    <separator string="Transfer Products" name="product_separator"/>
                    <field name="move_ids" context="{'hide_tracking': hide_tracking}">
                        <tree editable="bottom" string="Product Moves" create="false">
                            <field name="product_id" on_change="onchange_product_id(product_id)"/>
                            <field name="quantity" />
                            <field name="product_uom" groups="product.group_uom"/>
                            <field name="tracking" invisible="1"/>
                            <field name="prodlot_id" domain="[('product_id', '=', product_id)]" invisible="context.get('hide_tracking',False)" attrs="{'required':[('tracking','=',True), ('quantity', '!=', 0)]}" groups="stock.group_production_lot" context="{'default_product_id':product_id}"/>
                            <!-- Removed as this feature is not logic: price must be updated upon reception of invoice -->
                            <field name="update_cost" invisible="1"/>
                            <field name="cost" groups="base.group_multi_currency"/>
                            <field name="currency" readonly="1" groups="base.group_multi_currency"/>
                        </tree>
                    </field>
                    <field name="help_text" groups="base.group_multi_currency" class="oe_grey"/>
                    <footer>
                        <button name="do_partial" string="_Transfer" type="object" class="oe_highlight"/>
                        or
                        <button string="Cancel" class="oe_link" special="cancel" />
                    </footer>
                </form>
            </field>
        </record>

        <record id="stock_partial_picking_line_list" model="ir.ui.view">
            <field name="name">stock.partial.picking.line.list</field>
            <field name="model">stock.partial.picking.line</field>
            <field name="arch" type="xml">
                <tree editable="bottom" string="Product Moves">
                    <field name="product_id" />
                    <field name="quantity" />
                    <field name="product_uom" />
                    <field name="tracking" invisible="1"/>
                    <field name="prodlot_id" domain="[('product_id', '=', product_id)]" attrs="{'required':[('tracking','=',True)]}"/>
                    <!-- Removed as this feature is not logic: price must be updated upon reception of invoice -->
                    <field name="update_cost" invisible="1"/>
                    <field name="cost" invisible="1"/>
                    <field name="currency" invisible="1"/>
                </tree>
            </field>
        </record>
        <record id="stock_partial_picking_line_form" model="ir.ui.view">
            <field name="name">stock.partial.picking.line.form</field>
            <field name="model">stock.partial.picking.line</field>
            <field name="arch" type="xml">
                <form string="Stock Picking Line" version="7.0">
                    <group col="4">
                        <field name="product_id" />
                        <field name="quantity" />
                        <field name="product_uom" />
                        <field name="location_id" />
                        <field name="location_dest_id" />
                        <field name="tracking" invisible="1"/>
                        <field name="prodlot_id" domain="[('product_id', '=', product_id)]" attrs="{'required':[('tracking','=',True)]}"/>
                        <field name="update_cost" invisible="1"/>
                        <field name="cost" attrs="{'invisible': [('update_cost','=', False)]}"/>
                        <field name="currency" attrs="{'invisible': [('update_cost','=', False)]}" groups="base.group_multi_currency"/>
                    </group>
                 </form>
            </field>
        </record>
    </data>
</openerp>
