<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="view_stock_move_track_wizard" model="ir.ui.view">
                <field name="name">Tracking a move</field>
                <field name="model">stock.move.track</field>
                <field name="type">form</field>
                <field name="arch" type="xml">
                    <form string="Tracking a move">
                        <field name="tracking_prefix" colspan="4"/>
                        <field name="quantity" colspan="4"/>
                        <newline/>
                        <separator string="" colspan="4" />
                        <button icon='gtk-cancel' special="cancel"
                            string="_Cancel" />
                        <button name="track_lines" string="Ok"
                            type="object" icon="gtk-ok" />
                    </form>
                </field>
            </record>

            <record id="track_line_old" model="ir.actions.act_window">
                <field name="name">Tracking a move</field>
                <field name="type">ir.actions.act_window</field>
                <field name="res_model">stock.move.track</field>
                <field name="view_type">form</field>
                <field name="view_mode">form</field>
                <field name="target">new</field>
            </record>


        <!--  Consume, scrap move -->

        <record id="view_stock_move_consume_wizard" model="ir.ui.view">
            <field name="name">Consume Move</field>
            <field name="model">stock.move.consume</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Consume Move">
                    <separator string="Consume Products" colspan="4"/>
                    <field name="product_id" colspan="4" readonly="1"/>
                    <field name="location_id" colspan="4" />
                    <field name="product_qty" colspan="2"/>
                    <field name="product_uom" nolabel="1" readonly="1"/>
                    <newline/>
                    <separator string="" colspan="4" />
                    <label string="" colspan="2" />
                    <group col="2" colspan="1">
                        <button icon='gtk-cancel' special="cancel"
                            string="Cancel" />
                        <button name="do_move_consume" string="Ok"
                            colspan="1" type="object" icon="gtk-ok" />
                    </group>
                </form>
            </field>
        </record>

        <record id="move_consume" model="ir.actions.act_window">
            <field name="name">Consume Move</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">stock.move.consume</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

       <record id="view_stock_move_scrap_wizard" model="ir.ui.view">
            <field name="name">Scrap Move</field>
            <field name="model">stock.move.scrap</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Scrap Move">
                    <separator string="Scrap Products" colspan="4"/>
                    <field name="product_id" colspan="4" readonly="1"/>
                    <field name="location_id" colspan="4" string="Scrap Location" domain="[('usage','&lt;&gt;','view'),('scrap_location','=',True)]" widget="selection"/>
                    <field name="product_qty" colspan="2"/>
                    <field name="product_uom" nolabel="1" readonly="1"/>
                    <newline/>
                    <separator string="" colspan="4" />
                    <label string="" colspan="2" />
                    <group col="2" colspan="1">
                        <button icon='gtk-cancel' special="cancel"
                            string="Cancel" />
                        <button name="move_scrap" string="Ok"
                            colspan="1" type="object" icon="gtk-ok" />
                    </group>
                </form>
            </field>
        </record>

        <record id="move_scrap" model="ir.actions.act_window">
            <field name="name">Scrap Move</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">stock.move.scrap</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <record id="view_split_in_lots" model="ir.ui.view">
	            <field name="name">Split in lots</field>
	            <field name="model">stock.move.split</field>
	            <field name="type">form</field>
	            <field name="arch" type="xml">
				<form string="Split in lots">
				<group width="660" height="275">
                  <field name="product_id" colspan="4" readonly="1"/>
                  <newline/>
                  <group colspan="4" col="4">
                      <group colspan="1" col="2">
                          <field name="use_exist"/>
                      </group>
                      <group colspan="1" col="2">
                          <field name="qty" readonly="1"/>
                       </group>
                      <group colspan="1" col="2">
                          <field name="product_uom" readonly="1"/>
                      </group>
                  </group>

                  <group colspan="4" attrs="{'invisible':[('use_exist','=',True)]}">
                        <field name="line_ids" colspan="4" nolabel="1">
                            <tree string="Production Lot Numbers" editable="bottom">
                                <field name="name" string="Lots"/>
                                <field name="quantity" />
                            </tree>
                            <form string="Production Lot Number">
                                <field name="name" string="Lot number"/>
                                <field name="quantity" />
                            </form>
                        </field>
                    </group>
                  <group colspan="4" attrs="{'invisible':[('use_exist','!=',True)]}">
                        <field name="line_exist_ids" colspan="4" nolabel="1">
                            <tree string="Production Lot Numbers" editable="bottom">
                                <field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]"/>
                                <field name="quantity" />
                            </tree>
                            <form string="Production Lot Number">
                                <field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]"/>
                                <field name="quantity" />
                            </form>
                        </field>
                    </group>
	                	<separator string="" colspan="4" />
	                	<label string="" colspan="2" />
	                	<button icon='gtk-cancel' special="cancel"
	                		string="Cancel" />
	                	<button name="split_lot" string="Ok"
	                		type="object" icon="gtk-ok" />
					</group>
	                </form>
	            </field>
	        </record>

	        <record id="track_line" model="ir.actions.act_window">
	            <field name="name">Split in lots</field>
	            <field name="type">ir.actions.act_window</field>
	            <field name="res_model">stock.move.split</field>
	            <field name="view_type">form</field>
	            <field name="view_mode">form</field>
	            <field name="target">new</field>
	        </record>

	</data>
</openerp>
