odoo/addons/report_purchase/report_purchase_view.xml

172 lines
8.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Purchases by products by month -->
<record id="view_order_product_form" model="ir.ui.view">
<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 by products">
<field name="name" select="1"/>
<field name="month" 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_product_month_graph">
<field name="name">product.month.graph</field>
<field name="model">report.purchase.order.product</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Purchases by products" type="bar">
<field name="product_id"/>
<field name="quantity" operator="+"/>
<field name="price_total" operator="+"/>
</graph>
</field>
</record>
<record id="view_order_product_tree" model="ir.ui.view">
<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 by products">
<field name="name"/>
<field name="month"/>
<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 id="view_order_product_search" model="ir.ui.view">
<field name="name">report.purchase.order.product.search</field>
<field name="model">report.purchase.order.product</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Purchases by products">
<group col="8" colspan="4">
<filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by products during this year"/>
<filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by products during this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="product_id" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record id="action_order_product_tree_all" model="ir.actions.act_window">
<field name="name">Purchases by Products</field>
<field name="res_model">report.purchase.order.product</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_order_product_search"/>
</record>
<menuitem id="next_id_73" name="Reporting" parent="purchase.menu_purchase_root"/>
<menuitem action="action_order_product_tree_all" id="menu_report_order_product_all"
name="PO by Products" parent="next_id_73"/>
<!-- Purchases by category by month -->
<record id="view_order_category_form" model="ir.ui.view">
<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 by Category of Products">
<field name="name" select="1"/>
<field name="month" 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_product_category_graph">
<field name="name">product.category.graph</field>
<field name="model">report.purchase.order.category</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Purchases by Category of Products" type="bar">
<field name="category_id"/>
<field name="quantity" operator="+"/>
<field name="price_total" operator="+"/>
</graph>
</field>
</record>
<record id="view_order_category_tree" model="ir.ui.view">
<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 by Category of Products">
<field name="name"/>
<field name="month"/>
<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 id="view_order_category_search" model="ir.ui.view">
<field name="name">report.purchase.order.category.search</field>
<field name="model">report.purchase.order.category</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Purchases by category of products">
<group col="8" colspan="4">
<filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by categories of products during this year"/>
<filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by categories of products during this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="category_id" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record id="action_order_category_tree_all" model="ir.actions.act_window">
<field name="name">Purchases by Category of Products</field>
<field name="res_model">report.purchase.order.category</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_order_category_search"/>
</record>
<menuitem action="action_order_category_tree_all" id="menu_report_order_category_all"
name="PO by Products Category" parent="report_purchase.next_id_73"/>
<act_window domain="[('product_id', '=', active_id)]" id="act_product_product_2_report_purchases_order_product" name="Monthly purchases" res_model="report.purchase.order.product" src_model="product.product"/>
<act_window domain="[('category_id', '=', active_id)]" id="act_product_category_2_report_purchase_order_category" name="Monthly purchases" res_model="report.purchase.order.category" src_model="product.category"/>
</data>
</openerp>