<terp>
<data>

	#
	# Pickings by invoice type
	#

	<record model="ir.ui.view" id="view_picking_invoice_type_stats_form">
		<field name="name">sale_journal.invoice.type.stats.form</field>
		<field name="model">sale_journal.invoice.type.stats</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Pickings by invoice method">
				<field name="name" select="1"/>
				<field name="invoice_state" select="1"/>
				<field name="state" select="1"/>
				<field name="invoice_type_id" select="1"/>
				<field name="quantity"/>
				<field name="count"/>
				<field name="price_total"/>
				<field name="price_average"/>
			</form>
		</field>
	</record>
	<record model="ir.ui.view" id="view_picking_invoice_type_stats_tree">
		<field name="name">sale_journal.invoice.type.stats.tree</field>
		<field name="model">sale_journal.invoice.type.stats</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Pickings by invoice method">
				<field name="name"/>
				<field name="invoice_state"/>
				<field name="state"/>
				<field name="invoice_type_id"/>
				<field name="quantity"/>
				<field name="count"/>
				<field name="price_total"/>
				<field name="price_average"/>
			</tree>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_invoice_type_picking_stats_open">
		<field name="name">Statistics on pickings to invoice</field>
		<field name="res_model">sale_journal.invoice.type.stats</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'),('invoice_type_id','=',active_id)]</field>
	</record>
	<record model="ir.values" id="ir_open_invoice_type_stats">
		<field name="key2">tree_but_open</field>
		<field name="model">sale_journal.invoice.type</field>
		<field name="name">Statistics on pickings to invoice</field>
		<field name="value" eval="'ir.actions.act_window,%d'%action_invoice_type_picking_stats_open"/>
		<field name="object" eval="True"/>
	</record>

	<record model="ir.actions.act_window" id="action_invoice_type_picking_stats_open_menu_month">
		<field name="name">sale_journal.invoice.type.stats.open</field>
		<field name="res_model">sale_journal.invoice.type.stats</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">[('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem
		name="Inventory Control/Reporting/This month/Pickings by invoice method"
		action="action_invoice_type_picking_stats_open_menu_month"
		id="menu_invoice_type_picking_stats_open_menu"/>

	<record model="ir.actions.act_window" id="action_invoice_type_picking_stats_open_menu_all">
		<field name="name">sale_journal.invoice.type.stats.open</field>
		<field name="res_model">sale_journal.invoice.type.stats</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/Reporting/All months/Pickings by invoice method"
		action="action_invoice_type_picking_stats_open_menu_all"
		id="menu_invoice_type_picking_stats_open_all"/>

	#
	# Pickings by journal
	#

	<record model="ir.ui.view" id="view_picking_journal_stats_form">
		<field name="name">sale_journal.picking.stats.form</field>
		<field name="model">sale_journal.picking.stats</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Pickings by journals">
				<field name="name" select="1"/>
				<field name="state" select="1"/>
				<field name="journal_id" select="1"/>
				<field name="quantity"/>
				<field name="count"/>
				<field name="price_total"/>
				<field name="price_average"/>
			</form>
		</field>
	</record>
	<record model="ir.ui.view" id="view_picking_journal_stats_tree">
		<field name="name">sale_journal.picking.stats.tree</field>
		<field name="model">sale_journal.picking.stats</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Pickings by journals">
				<field name="name"/>
				<field name="state"/>
				<field name="journal_id"/>
				<field name="quantity"/>
				<field name="count"/>
				<field name="price_total"/>
				<field name="price_average"/>
			</tree>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_picking_picking_stats_open_menu_month">
		<field name="name">sale_journal.picking.stats.open</field>
		<field name="res_model">sale_journal.picking.stats</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">[('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem
		name="Inventory Control/Reporting/This month/Pickings by journal"
		action="action_picking_picking_stats_open_menu_month"
		id="menu_picking_picking_stats_open_menu"/>

	<record model="ir.actions.act_window" id="action_picking_picking_stats_open_menu_all">
		<field name="name">sale_journal.picking.stats.open</field>
		<field name="res_model">sale_journal.picking.stats</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/Reporting/All months/Pickings by journal"
		action="action_picking_picking_stats_open_menu_all"
		id="menu_picking_picking_stats_open_all"/>



</data>
</terp>
