1 <?xml version="1.0" encoding="utf-8"?>
5 <!-- Purchases by products by month -->
6 <record id="view_order_product_form" model="ir.ui.view">
7 <field name="name">report.purchase.order.product.form</field>
8 <field name="model">report.purchase.order.product</field>
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <form string="Purchases by products">
12 <field name="name" select="1"/>
13 <field name="product_id" select="1"/>
15 <field name="quantity" select="1"/>
16 <field name="price_total" select="1"/>
17 <field name="price_average" select="1"/>
18 <field name="state" select="1"/>
23 <record id="view_order_product_tree" model="ir.ui.view">
24 <field name="name">report.purchase.order.product.tree</field>
25 <field name="model">report.purchase.order.product</field>
26 <field name="type">tree</field>
27 <field name="arch" type="xml">
28 <tree string="Purchases by products">
30 <field name="product_id"/>
32 <field name="quantity"/>
33 <field name="price_total"/>
34 <field name="price_average"/>
40 <record id="action_order_product_tree" model="ir.actions.act_window">
41 <field name="name">Purchases by Products (this month)</field>
42 <field name="res_model">report.purchase.order.product</field>
43 <field name="view_type">form</field>
44 <field name="view_mode">tree</field>
45 <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
47 <menuitem id="next_id_73" name="Reporting" parent="purchase.menu_purchase_root"/><menuitem id="next_id_74" name="This Month" parent="next_id_73"/><menuitem action="action_order_product_tree" id="menu_report_order_product" parent="next_id_74"/>
48 <record id="action_order_product_tree_all" model="ir.actions.act_window">
49 <field name="name">Purchases by Products</field>
50 <field name="res_model">report.purchase.order.product</field>
51 <field name="view_type">form</field>
52 <field name="view_mode">tree</field>
54 <menuitem id="next_id_75" name="All Months" parent="report_purchase.next_id_73"/><menuitem action="action_order_product_tree_all" id="menu_report_order_product_all" parent="next_id_75"/>
56 <!-- Purchases by category by month -->
58 <record id="view_order_category_form" model="ir.ui.view">
59 <field name="name">report.purchase.order.category.form</field>
60 <field name="model">report.purchase.order.category</field>
61 <field name="type">form</field>
62 <field name="arch" type="xml">
63 <form string="Purchases by Category of Products">
64 <field name="name" select="1"/>
65 <field name="category_id" select="1"/>
67 <field name="quantity" select="1"/>
68 <field name="price_total" select="1"/>
69 <field name="price_average" select="1"/>
70 <field name="state" select="1"/>
75 <record id="view_order_category_tree" model="ir.ui.view">
76 <field name="name">report.purchase.order.category.tree</field>
77 <field name="model">report.purchase.order.category</field>
78 <field name="type">tree</field>
79 <field name="arch" type="xml">
80 <tree string="Purchases by Category of Products">
82 <field name="category_id"/>
84 <field name="quantity"/>
85 <field name="price_total"/>
86 <field name="price_average"/>
92 <record id="action_order_category_tree" model="ir.actions.act_window">
93 <field name="name">Purchases by Category of Product (this month)</field>
94 <field name="res_model">report.purchase.order.category</field>
95 <field name="view_type">form</field>
96 <field name="view_mode">tree</field>
97 <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
99 <menuitem action="action_order_category_tree" id="menu_report_order_category" parent="report_purchase.next_id_74"/>
100 <record id="action_order_category_tree_all" model="ir.actions.act_window">
101 <field name="name">Purchases by Category of Products</field>
102 <field name="res_model">report.purchase.order.category</field>
103 <field name="view_type">form</field>
104 <field name="view_mode">tree</field>
106 <menuitem action="action_order_category_tree_all" id="menu_report_order_category_all" parent="report_purchase.next_id_75"/>
108 <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"/>
110 <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"/>