<?xml version="1.0"?>
<terp>
<data>
	<menuitem name="Inventory Control" id="menu_stock_root" icon="terp-stock"/>
	<menuitem name="Inventory Control/Configuration" groups="admin" sequence="1"/>

	=============================
	Inventory Line
	=============================
	<record model="ir.ui.view" id="stock_inventory_line_tree">
		<field name="name">stock.inventory.line.tree</field>
		<field name="model">stock.inventory.line</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Stock Inventory Lines">
				<field name="location_id"/>
				<field name="product_id"/>
				<field name="product_qty"/>
				<field name="product_uom"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_inventory_line_form">
		<field name="name">stock.inventory.line.form</field>
		<field name="model">stock.inventory.line</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Stock Inventory Lines">
				<field name="location_id" colspan="3" select="1" domain="[('usage','=','internal')]"/>
				<field name="product_id" select="1"  on_change="on_change_product_id(location_id,product_id,product_uom)" context="location=location_id,uom=product_uom"/>
				<field name="product_uom"/>
				<field name="product_qty"/>
			</form>
		</field>
	</record>
	
	=============================
	Inventory
	=============================
	<record model="ir.ui.view" id="view_inventory_tree">
		<field name="name">stock.inventory.tree</field>
		<field name="model">stock.inventory</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Lot Inventory">
				<field name="name"/>
				<field name="date"/>
				<field name="state"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_inventory_form">
		<field name="name">stock.inventory.form</field>
		<field name="model">stock.inventory</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Lot Inventory">
				<notebook>
					<page string="General Informations">
						<field name="name" select="1"/>
						<field name="date" select="1"/>
						<field nolabel="1" name="inventory_line_id" widget="one2many_list" colspan="4"/>
						<field name="state" select="1"/>
						<group col="2" colspan="2">
							<button name="action_done" states="draft" string="Confirm Inventory" type="object"/>
							<button name="action_cancel" states="done" string="Cancel Inventory" type="object"/>
						</group>
					</page>
					<page string="Posted Inventory">
						<field name="move_ids" colspan="4" nolabel="1"/>
					</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_inventory_form">
		<field name="name">stock.inventory.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.inventory</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_inventory_form"/>
	</record>
	<menuitem name="Inventory Control/Lot Inventory" id="menu_action_inventory_form" action="action_inventory_form"/>

	=============================
	Lot
	=============================

	<record model="ir.ui.view" id="prodlot_form">
		<field name="name">stock.production.lot.form</field>
		<field name="model">stock.production.lot</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Lot">
				<field name="name" select="1"/>
				<field name="ref"/>
				<field name="date" />
			</form>
		</field>
	</record>
	<record model="ir.ui.view" id="view_tracking_form">
		<field name="name">stock.tracking.form</field>
		<field name="model">stock.tracking</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Tracking/Serial">
				<field name="name" select="1"/>
				<field name="serial" select="1"/>
				<field name="date" select="1"/>
				<field name="active" select="1"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_tracking_form">
		<field name="name">stock.tracking.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.tracking</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_tracking_form"/>
	</record>
	<menuitem name="Inventory Control/Traceability" sequence="2"/>
	<menuitem name="Inventory Control/Traceability/Tracking Numbers" id="menu_action_tracking_form" action="action_tracking_form"/>

	<record model="ir.ui.view" id="lot_line_tree">
		<field name="name">stock.tracking.tree</field>
		<field name="model">stock.tracking</field>
		<field name="type">tree</field>
		<field name="field_parent">child_ids</field>
		<field name="arch" type="xml">
			<tree string="Tracking Number" color="grey:not active">
				<field name="name" select="1"/>
				<field name="serial" select="1"/>
				<field name="date" select="1"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_lot_tree">
		<field name="name">stock.lot.tree</field>
		<field name="model">stock.lot</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Stock Lot">
				<field name="name"/>
				<field name="tracking"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_lot_form">
		<field name="name">stock.lot.form</field>
		<field name="model">stock.lot</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Stock Lot">
				<field name="name" colspan="3" select="1"/>
				<field name="active" select="1"/>
				<field name="tracking" select="1"/>
				<newline/>
				<field name="move_ids" colspan="4" nolabel="1" widget="one2many_list"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_lot_form">
		<field name="name">stock.lot.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.lot</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_lot_form"/>
	</record>
	<menuitem name="Inventory Control/Traceability/Consumer lots" id="menu_action_lot_form" action="action_lot_form"/>
	
	<record model="ir.ui.view" id="view_production_lot_revision_form">
		<field name="name">stock.production.lot.revision.form</field>
		<field name="model">stock.production.lot.revision</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Production Lot Revisions">
				<field name="name" colspan="4" />
				<field name="indice" colspan="2" />
				<field name="date" colspan="2" />
				<newline/>
				<field name="author_id" readonly="1" />
				<newline/>
				<field name="description" />
			</form>
		</field>
	</record>
	<record model="ir.ui.view" id="view_production_lot_revision_tree">
		<field name="name">stock.production.lot.revision.tree</field>
		<field name="model">stock.production.lot.revision</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Production Lot Revisions">
				<field name="indice"/>
				<field name="author_id"/>
				<field name="date"/>
				<field name="name"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_production_lot_form">
		<field name="name">stock.production.lot.form</field>
		<field name="model">stock.production.lot</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Production Lot">
				<field name="name" select="1"/>
				<field name="ref"/>
				<field name="date" select="1"/>
				<field name="revisions" colspan="4" widget="one2many_list"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_production_lot_form">
		<field name="name">stock.production.lot.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.production.lot</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_production_lot_form"/>
	</record>
	<menuitem name="Inventory Control/Traceability/Production lots" id="menu_action_production_lot_form" action="action_production_lot_form"/>


	#
	# Lot composition (history)
	# 
	<record model="ir.ui.view" id="stock_move_tree">
		<field name="name">stock.move.tree2</field>
		<field name="model">stock.move</field>
		<field name="type">tree</field>
		<field name="field_parent">move_history_ids</field>
		<field name="arch" type="xml">
			<tree string="Moves" color="grey:state=='cancel'">
				<field name="product_id" select="1"/>
				<field name="product_qty" select="1"/>
				<field name="product_uom" select="1" string="UOM"/>
				<field name="product_packaging" />
				<field name="location_id" select="1"/>
				<field name="location_dest_id" select="1"/>
				<field name="lot_id" select="1"/>
				<field name="date" select="1"/>
				<field name="date_planned" select="1"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="stock_move_tree2">
		<field name="name">stock.move.tree2</field>
		<field name="model">stock.move</field>
		<field name="type">tree</field>
		<field name="field_parent">move_history_ids2</field>
		<field name="arch" type="xml">
			<tree string="Moves" color="grey:state=='cancel'">
				<field name="product_id" select="1"/>
				<field name="product_qty" select="1"/>
				<field name="product_uom" select="1" string="UOM"/>
				<field name="product_packaging" />
				<field name="location_id" select="1"/>
				<field name="location_dest_id" select="1"/>
				<field name="lot_id" select="1"/>
				<field name="date" select="1"/>
				<field name="date_planned" select="1"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<wizard string="Downstream traceability" model="stock.production.lot" name="stock.traceability.lot.amont" id="action_lot2"/>
	<wizard string="Upstream traceability" model="stock.production.lot" name="stock.traceability.lot.aval" id="action_lot4"/>

	<wizard string="Upstream traceability" model="stock.tracking" name="stock.traceability.amont" id="action2"/>
	<wizard string="Downstream traceability" model="stock.tracking" name="stock.traceability.aval" id="action4"/>

	<record model="ir.actions.act_window" id="action3">
		<field name="name">Downstream traceability</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.move</field>
		<field name="domain">[('id','in',active_ids)]</field>
		<field name="view_type">tree</field>
		<field name="view_id" eval="stock_move_tree"/>
	</record>
	<record model="ir.values" id="ir_move_traceability_upstream">
		<field name="key2" eval="'tree_but_action'"/>
		<field name="model" eval="'stock.move'"/>
		<field name="name">Downstream traceability</field>
		<field name="value" eval="'ir.actions.act_window,'+str(action3)"/>
		<field name="object" eval="True"/>
	</record>


	#
	# Composed lots
	#

	<record model="ir.actions.act_window" id="action5">
		<field name="name">Upstream traceability</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">stock.move</field>
		<field name="domain">[('id','in',active_ids)]</field>
		<field name="view_type">tree</field>
		<field name="view_id" eval="stock_move_tree2"/>
	</record>
	<record model="ir.values" id="ir_move_traceability_downstream">
		<field name="key2" eval="'tree_but_action'"/>
		<field name="model" eval="'stock.move'"/>
		<field name="name">Upstream traceability</field>
		<field name="value" eval="'ir.actions.act_window,'+str(action5)"/>
		<field name="object" eval="True"/>
	</record>



	=============================
	Location
	=============================
	<record model="ir.ui.view" id="view_location_form">
		<field name="name">stock.location.form</field>
		<field name="model">stock.location</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form auto_menu="" string="Stock Location">
				<notebook>
					<page string="General Informations">
						<field name="name" select="1"/>
						<field name="active" select="1"/>
						<field name="usage" select="1"/>
						<field name="account_id" select="1"/>
						<field name="location_id"/>
						<newline/>
						<field name="comment" colspan="3"/>
					</page>
					<page string="Localisation">
						<field name="posx"/>
						<field name="posy"/>
						<field name="posz"/>
					</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_location_form">
		<field name="name">stock.location</field>
		<field name="res_model">stock.location</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_location_form"/>
	</record>
	<menuitem name="Inventory Control/Configuration/Location" id="menu_action_location_form" action="action_location_form"/>

	<record model="ir.ui.view" id="view_location_tree">
		<field name="name">stock.location.tree</field>
		<field name="model">stock.location</field>
		<field name="type">tree</field>
		<field name="field_parent">child_ids</field>
		<field name="arch" type="xml">
			<tree string="Stock Location Tree">
				<field name="name"/>
			</tree>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_location_tree">
		<field name="name">stock.location.tree</field>
		<field name="res_model">stock.location</field>
		<field name="type">ir.actions.act_window</field>
		<field name="domain">[('location_id','=',False)]</field>
		<field name="view_type">tree</field>
		<field name="view_id" ref="view_location_tree"/>
	</record>
	<menuitem name="Inventory Control/Location Tree" id="menu_action_location_tree" action="action_location_tree"/>

	=============================
	Warehouse
	=============================
	<record model="ir.ui.view" id="view_warehouse">
		<field name="name">stock.warehouse</field>
		<field name="model">stock.warehouse</field>
		<field name="type">form</field>
<!--		<field name="parent_field">child_id</field> -->
		<field name="arch" type="xml">
			<form string="Stock Warehouse">
				<field name="name" select="1" colspan="4"/>
				<field name="lot_input_id"/>
				<field name="lot_stock_id"/>
				<field name="lot_output_id"/>
				<newline/>
				<field name="partner_address_id"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_warehouse_form">
		<field name="name">stock.warehouse</field>
		<field name="res_model">stock.warehouse</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_warehouse"/>
	</record>
	<menuitem name="Inventory Control/Configuration/Warehouse" id="menu_action_warehouse_form" action="action_warehouse_form"/>

	=============================
	Picking
	=============================
	<record model="ir.ui.view" id="vpicktree">
		<field name="name">stock.picking.tree</field>
		<field name="model">stock.picking</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Picking List" color="red:state=='cancel'">
				<field name="name" select="1" colspan="3"/>
				<field name="date" select="1"/>
				<field name="origin" select="1"/>
				<field name="loc_move_id" select="1"/>
				<field name="address_id" select="1"/>
				<field name="invoice_state" readonly="1"/>
				<field name="state" readonly="1"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_picking_form">
		<field name="name">stock.picking.form</field>
		<field name="model">stock.picking</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Picking List">
				<notebook>
				<page string="General Information">
					<field name="name" select="1"/>
					<field name="date" select="1"/>
					<newline/>
					<field name="type" select="1"/>
					<field name="move_type"/>
 					<field name="invoice_state" select="1"/>
					<field name="loc_move_id" select="1"/>
					<newline/>
					<field name="location_id" select="1"/>
					<field name="location_dest_id" select="1"/>
					<field name="address_id" select="1"/>
					<field name="move_lines" widget="one2many_list" colspan="4" nolabel="1">
						<form string="Stock Moves">
							<separator string="Move Information" colspan="4"/>
							<field name="product_id" colspan="4" select="1" on_change="onchange_product_id(product_id, parent.location_id, parent.location_dest_id)" context="location=parent.location_id"/>
							<field name="product_uom" select="1"/>
							<field name="product_qty" select="1"/>
							<field name="product_uos" />
							<field name="product_uos_qty" />
							<field name="name" select="1" colspan="4"/>
							<field name="date"/>
							<field name="date_planned"/>
							<field name="priority"/>
							<field name="lot_id" select="1"/>
							<field name="location_id" select="1"/>
							<field name="location_dest_id" select="1"/>
							<field name="address_id" select="1" /> 
							<field name="product_packaging"/>
							<field name="prodlot_id" select="1" context="product_id=product_id" />
							<field name="tracking_id" select="1" />
							<newline/>
							<label/>
							<button type="action" name="%(track_line)d" string="Split in production lots" />

							<separator string="Move State" colspan="4"/>
							<field name="state" select="1"/>
							<group>
								<button name="force_assign" string="Force assignation" states="confirmed" type="object"/>
								<button name="cancel_assign" string="Cancel assignation" states="assigned" type="object"/>
							</group>
						</form>
					</field>
					<group colspan="4" col="7">
						<label colspan="6"/>
						<button type="action" name="%(move_split)d" string="Split move lines in two"/>
					</group>
					<group colspan="4" col="8">
						<field name="state" readonly="1"/>
						<button name="button_confirm" string="Confirm Picking" states="draft"/>
						<button name="action_assign" string="Assign" states="confirmed" type="object"/>
						<button name="force_assign" string="Force assignations" states="confirmed" type="object"/>
						<button name="cancel_assign" string="Cancel assignations" states="assigned" type="object"/>
						<button type="action" name="%(partial_picking)d" string="Make Picking" states="assigned"/>
						<button name="button_cancel" string="Cancel Picking" states="assigned,confirmed,draft"/>
					</group>
				</page><page string="Notes">
					<field name="note" nolabel="1" colspan="4"/>
				</page><page string="Others Infos">
					<field name="origin" select="1"/>
					<field name="active" select="1"/>
					<field name="auto_picking"/>
					<newline/>
					<field name="lot_id" colspan="3"/>
					<field name="move_lot_id" colspan="3"/>
				</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_picking_form">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_picking_form"/>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists" id="menu_action_picking_form" action="action_picking_form"/>

	<record model="ir.actions.act_window" id="action_picking_tree">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('type','=','out')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Sending Goods" id="menu_action_picking_tree" action="action_picking_tree"/>
	<record model="ir.actions.act_window" id="action_picking_tree2">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','assigned'),('type','=','out')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Sending Goods/Pickings waiting delivery" action="action_picking_tree2" id="menu_picking_waiting"/>
	<record model="ir.actions.act_window" id="action_picking_tree3">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','confirmed'),('type','=','out')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Sending Goods/Pending Pickings for delivery" id="menu_action_picking_tree3" action="action_picking_tree3"/>


	<record model="ir.actions.act_window" id="action_picking_tree4">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('type','=','in')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Getting Goods" id="menu_action_picking_tree4" action="action_picking_tree4"/>
	<record model="ir.actions.act_window" id="action_picking_tree5">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','assigned'),('type','=','in')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Getting Goods/Pickings to process for goods reception" id="menu_action_picking_tree5" action="action_picking_tree5"/>

	<record model="ir.actions.act_window" id="action_picking_tree6">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('type','=','internal')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Internal picking lists" id="menu_action_picking_tree6" action="action_picking_tree6"/>
	<record model="ir.actions.act_window" id="action_picking_tree7">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','assigned'),('type','=','internal')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Internal picking lists/Internal Picking lists to process" id="menu_action_picking_tree7" action="action_picking_tree7"/>
	<record model="ir.actions.act_window" id="action_picking_tree8">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','confirmed'),('type','=','internal')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Internal picking lists/Internal Pending Picking lists" id="menu_action_picking_tree8" action="action_picking_tree8"/>
	<record model="ir.actions.act_window" id="action_picking_tree9">
		<field name="name">stock.picking</field>
		<field name="res_model">stock.picking</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">[('state','=','draft'),('type','=','internal')]</field>
		<field name="context">{'contact_display': 'partner'}</field>
	</record>
	<menuitem name="Inventory Control/Picking Lists/Internal picking lists/Draft Internal Picking lists" id="menu_action_picking_tree9" action="action_picking_tree9"/>

	=============================
	Move Tracking
	=============================


	=============================
	Move
	=============================
	<record model="ir.ui.view" id="view_move_lot_tree">
		<field name="name">stock.move.lot.tree</field>
		<field name="model">stock.move.lot</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Stock Move">
				<field name="name"/>
				<field name="date_planned"/>
				<field name="date_moved"/>
				<field name="lot_id"/>
				<field name="serial"/>
				<field name="address_id"/>
				<field name="state"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_move_lot_form">
		<field name="name">stock.move.lot.form</field>
		<field name="model">stock.move.lot</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Stock Move">
				<separator string="General Information" colspan="4"/>
				<field name="name" select="1"/>
				<field name="active" select="1"/>
				<field name="date_planned" select="1"/>
				<field name="date_moved" select="1" readonly="1"/>
				<field name="lot_id" select="1"/>
				<field name="loc_dest_id" select="1"/>
				<field name="serial" select="1"/>
				<field name="origin"/>
				<newline/>
				<field name="address_id" select="1"/>
				<separator string="State" colspan="4"/>
				<field name="state"/>
				<group col="2" colspan="2">
					<button name="action_move" type="object" string="Move Lot" states="draft"/>
				</group>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_move_form">
		<field name="name">stock.move.lot</field>
		<field name="res_model">stock.move.lot</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_move_lot_form"/>
	</record>
	<menuitem name="Inventory Control/Move" id="menu_action_move_form" action="action_move_form"/>
	<record model="ir.actions.act_window" id="action_move_tree">
		<field name="name">stock.move.lot</field>
		<field name="res_model">stock.move.lot</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">[('state','=','draft')]</field>
	</record>
	<menuitem name="Inventory Control/Move/Move Orders to process" action="action_move_tree" id="menu_move_draft"/>

	<record model="ir.ui.view" id="view_move_tree">
		<field name="name">stock.move.tree</field>
		<field name="model">stock.move</field>
		<field name="type">tree</field>
		<field name="priority" eval="6"/>
		<field name="arch" type="xml">
			<tree string="Moves" color="grey:state=='cancel'">
				<field name="product_id" select="1"/>
				<field name="product_qty" select="1"/>
				<field name="product_uom" select="1" string="UOM"/>
				<field name="product_packaging" />
				<field name="location_id" select="1"/>
				<field name="location_dest_id" select="1"/>
				<field name="lot_id" select="1"/>
				<field name="date" select="1"/>
				<field name="date_planned" select="1"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_move_form">
		<field name="name">stock.move.form</field>
		<field name="model">stock.move</field>
		<field name="type">form</field>
		<field name="priority" eval="4"/>
		<field name="arch" type="xml">
			<form string="Stock Moves">
				<separator string="Move Information" colspan="4"/>
				<field name="name" select="1" colspan="3"/>
				<field name="date"/>
				<field name="date_planned"/>
				<field name="product_id" colspan="3" select="1"/>
				<field name="product_uom" select="1"/>
				<field name="product_qty" select="1"/>
				<field name="location_id" select="1"/>
				<field name="location_dest_id" select="1"/>
				<field name="priority"/>
				<field name="lot_id" select="1"/>
				<field name="address_id" select="1" />
				<newline/>
				<field name="prodlot_id" select="1" context="product_id=product_id" />
				<field name="tracking_id" select="1" />
				<newline/>
				<label/>
				<button type="action" name="%(track_line)d"	string="Split in production lots"/>
				<separator string="Move State" colspan="4"/>
				<field name="state" select="1"/>
				<group col="4" colspan="2">
					<button name="action_confirm" string="Confirm" type="object" states="draft"/>
					<button name="action_assign" string="Assign" type="object" states="confirmed"/>
					<button name="action_cancel" string="Cancel" type="object" states="assigned"/>
					<button name="action_done" string="Make Parcel" type="object" states="assigned"/>
				</group>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_move_form2">
		<field name="name">stock.move</field>
		<field name="res_model">stock.move</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_move_form"/>
	</record>
	<menuitem name="Inventory Control/Traceability/Low Level/Moves" id="menu_action_move_form2" action="action_move_form2"/>

	<record model="ir.actions.act_window" id="action_move_form3">
		<field name="name">stock.move</field>
		<field name="res_model">stock.move</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="domain">[('state','=','draft')]</field>
		<field name="view_id" ref="view_move_form"/>
	</record>
	<menuitem name="Inventory Control/Traceability/Low Level/Moves/Draft Moves" id="menu_action_move_form3" action="action_move_form3"/>

	<record model="ir.actions.act_window" id="action_move_form4">
		<field name="name">stock.move</field>
		<field name="res_model">stock.move</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="domain">[('state','=','assigned')]</field>
		<field name="view_id" ref="view_move_form"/>
	</record>
	<menuitem name="Administration/Custom/Low level/Inventory Control/Moves/Assigned Moves" id="menu_action_move_form4" action="action_move_form4"/>


	# -------------------------------------------------------------
	# Stock incoterms
	# -------------------------------------------------------------
	<record model="ir.ui.view" id="view_incoterms_tree">
		<field name="name">stock.incoterms.tree</field>
		<field name="model">stock.incoterms</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Incoterms">
				<field name="code"/>
				<field name="name" select="1" colspan="3"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="stock_incoterms_form">
		<field name="name">stock.incoterms.form</field>
		<field name="model">stock.incoterms</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Incoterms">
				<field name="name" select="1" colspan="3"/>
				<field name="code" select="1"/>
				<field name="active" select="1"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_incoterms_tree">
		<field name="name">stock.incoterms</field>
		<field name="res_model">stock.incoterms</field>
		<field name="type">ir.actions.act_window</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
	</record>
	<menuitem name="Inventory Control/Configuration/Incoterms" id="menu_action_incoterms_tree" action="action_incoterms_tree"/>

</data>
</terp>
