<?xml version="1.0"?>
<terp>
<data>

	#
	# Purchases by products by month
	#

	<record model="ir.ui.view" id="view_order_product_form">
		<field name="name">report.purchase.order.product.form</field>
		<field name="model">report.purchase.order.product</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Purchases Orders by products">
				<field name="name" select="1"/>
				<field name="product_id" select="1"/>
				<field name="count"/>
				<field name="quantity" select="1"/>
				<field name="price_total" select="1"/>
				<field name="price_average" select="1"/>
				<field name="state" select="1"/>
			</form>
		</field>
	</record>

	<record model="ir.ui.view" id="view_order_product_tree">
		<field name="name">report.purchase.order.product.tree</field>
		<field name="model">report.purchase.order.product</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Purchases Orders by products">
				<field name="name"/>
				<field name="product_id"/>
				<field name="count"/>
				<field name="quantity"/>
				<field name="price_total"/>
				<field name="price_average"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_order_product_tree">
		<field name="name">report.purchase.order.product.tree</field>
		<field name="res_model">report.purchase.order.product</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
		<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem name="Purchase Management/Reporting/This Month/Purchases by Product" action="action_order_product_tree" id="menu_report_order_product"/>
	<record model="ir.actions.act_window" id="action_order_product_tree_all">
		<field name="name">report.purchase.order.product.tree</field>
		<field name="res_model">report.purchase.order.product</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
	</record>
	<menuitem name="Purchase Management/Reporting/All Months/Purchases by Product" action="action_order_product_tree_all" id="menu_report_order_product_all"/>

	#
	# Purchases by category by month
	#

	<record model="ir.ui.view" id="view_order_category_form">
		<field name="name">report.purchase.order.category.form</field>
		<field name="model">report.purchase.order.category</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Purchases Orders by categories">
				<field name="name" select="1"/>
				<field name="category_id" select="1"/>
				<field name="count"/>
				<field name="quantity" select="1"/>
				<field name="price_total" select="1"/>
				<field name="price_average" select="1"/>
				<field name="state" select="1"/>
			</form>
		</field>
	</record>

	<record model="ir.ui.view" id="view_order_category_tree">
		<field name="name">report.purchase.order.category.tree</field>
		<field name="model">report.purchase.order.category</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Purchases Orders by categories">
				<field name="name"/>
				<field name="category_id"/>
				<field name="count"/>
				<field name="quantity"/>
				<field name="price_total"/>
				<field name="price_average"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_order_category_tree">
		<field name="name">report.purchase.order.category.tree</field>
		<field name="res_model">report.purchase.order.category</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
		<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem name="Purchase Management/Reporting/This Month/Purchases by Category of Product" action="action_order_category_tree" id="menu_report_order_category"/>
	<record model="ir.actions.act_window" id="action_order_category_tree_all">
		<field name="name">report.purchase.order.category.tree</field>
		<field name="res_model">report.purchase.order.category</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
	</record>
	<menuitem name="Purchase Management/Reporting/All Months/Purchases by Category of Product" action="action_order_category_tree_all" id="menu_report_order_category_all"/>


</data>
</terp>
