<?xml version="1.0"?>
<terp>
<data>
	#
	# Delivery Carriers
	# 
	<menuitem name="Inventory Control/Configuration/Delivery" sequence="4"/>

	<record model="ir.ui.view" id="view_delivery_carrier_tree">
		<field name="name">delivery.carrier.tree</field>
		<field name="model">delivery.carrier</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Carrier">
				<field name="name"/>
				<field name="partner_id"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_delivery_carrier_form">
		<field name="name">delivery.carrier.form</field>
		<field name="model">delivery.carrier</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Carrier">
				<field name="name" select="1"/>
				<field name="active" select="1"/>
				<field name="partner_id" select="1"/>
				<field name="product_id" select="1"/>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_delivery_carrier_form">
		<field name="name">delivery.carrier</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">delivery.carrier</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
	</record>
	<menuitem name="Inventory Control/Configuration/Delivery/Carriers" id="menu_action_delivery_carrier_form" action="action_delivery_carrier_form"/>

	#
	# Delivery Grids
	# 

	<record model="ir.ui.view" id="view_delivery_grid_tree">
		<field name="name">delivery.grid.tree</field>
		<field name="model">delivery.grid</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Delivery grids">
				<field name="sequence"/>
				<field name="carrier_id"/>
				<field name="name"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_delivery_grid_form">
		<field name="name">delivery.grid.form</field>
		<field name="model">delivery.grid</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Delivery grids">
				<notebook>
				<page string="Grid definition">
					<field name="name" select="1"/>
					<field name="active" select="1"/>
					<field name="carrier_id" select="1"/>
					<field name="sequence" select="1"/>
					<separator colspan="4" string="Grid Lines"/>
					<field name="line_ids" select="1" colspan="4" nolabel="1"/>
				</page><page string="Destination">
					<field name="country_ids" colspan="3"/>
					<field name="state_ids" colspan="3"/>
					<field name="zip_from"/>
					<field name="zip_to"/>
				</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_delivery_grid_form">
		<field name="name">delivery.grid.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">delivery.grid</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
	</record>
	<menuitem name="Inventory Control/Configuration/Delivery/Grids Definition" id="menu_action_delivery_grid_form" action="action_delivery_grid_form"/>


	<record model="ir.ui.view" id="view_delivery_grid_line_form">
		<field name="name">delivery.grid.line.form</field>
		<field name="model">delivery.grid.line</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Grid Lines">
				<field name="name" select="1" colspan="3"/>
				<field name="type" string="Condition"/>
				<field name="operator" nolabel="1"/>
				<field name="max_value" nolabel="1"/>
				<field name="list_price"/>
				<field name="standard_price"/>
				<field name="price_type"/>
				<field name="variable_factor"/>
			</form>
		</field>
	</record>
	<record model="ir.ui.view" id="view_delivery_grid_line_tree">
		<field name="name">delivery.grid.line.tree</field>
		<field name="model">delivery.grid.line</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Grid Lines">
				<field name="name"/>
				<field name="type"/>
				<field name="operator"/>
				<field name="max_value"/>
				<field name="list_price"/>
				<field name="standard_price"/>
			</tree>
		</field>
	</record>





		<record model="ir.ui.view" id="view_order_withcarrier_form">
			<field name="name">delivery.sale.order_withcarrier.form.view</field>
			<field name="type">form</field>
			<field name="model">sale.order</field>
			<field name="inherit_id" ref="sale.view_order_form" />
			<field name="arch" type="xml">
				<field name="client_order_ref" position="after">
 						<field name="carrier_id" /> 
				</field>
			</field>
		</record>



		<record model="ir.ui.view" id="view_picking_withcarrier_form">
			<field name="name">delivery.stock.picking_withcarrier.form.view</field>
			<field name="type">form</field>
			<field name="model">stock.picking</field>
			<field name="inherit_id" ref="stock.view_picking_form" />
			<field name="arch" type="xml">
				<field name="address_id" position="after">
						<field name="volume" /> 
						<field name="weight" /> 
 						<field name="carrier_id" /> 
				</field>
			</field>
		</record>

	<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">[('invoice_state','=','2binvoiced'),('state','=','done')]</field>
	</record>
	<menuitem
		name="Inventory Control/Picking Lists/Sending Goods/Pickings to invoice"
		id="menu_action_picking_tree3"
		action="action_picking_tree4"/>

</data>
</terp>
