1
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="month" select="1"/>
14
<field name="product_id" select="1"/>
16
<field name="quantity" select="1"/>
17
<field name="price_total" select="1"/>
18
<field name="price_average" select="1"/>
19
<field name="state" select="1"/>
24
<record model="ir.ui.view" id="view_product_month_graph">
4
<record model="ir.ui.view" id="view_purchase_order_graph">
25
5
<field name="name">product.month.graph</field>
26
<field name="model">report.purchase.order.product</field>
27
<field name="type">graph</field>
28
<field name="arch" type="xml">
29
<graph string="Purchases by products" type="bar">
30
<field name="product_id"/>
31
<field name="quantity" operator="+"/>
32
<field name="price_total" operator="+"/>
37
<record id="view_order_product_tree" model="ir.ui.view">
38
<field name="name">report.purchase.order.product.tree</field>
39
<field name="model">report.purchase.order.product</field>
40
<field name="type">tree</field>
41
<field name="arch" type="xml">
42
<tree string="Purchases by products">
45
<field name="product_id"/>
47
<field name="quantity"/>
48
<field name="price_total"/>
49
<field name="price_average"/>
55
<record id="view_order_product_search" model="ir.ui.view">
56
<field name="name">report.purchase.order.product.search</field>
57
<field name="model">report.purchase.order.product</field>
58
<field name="type">search</field>
59
<field name="arch" type="xml">
60
<search string="Purchases by products">
61
<group col="8" colspan="4">
62
<filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by products during this year"/>
63
<filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by products during this month"/>
64
<separator orientation="vertical"/>
65
<field name="name" select="1"/>
66
<field name="month" select="1"/>
67
<field name="product_id" select="1"/>
68
<field name="state" select="1"/>
74
<record id="action_order_product_tree_all" model="ir.actions.act_window">
75
<field name="name">Purchases by Products</field>
76
<field name="res_model">report.purchase.order.product</field>
77
<field name="view_type">form</field>
78
<field name="view_mode">tree,graph</field>
79
<field name="search_view_id" ref="view_order_product_search"/>
82
<menuitem id="next_id_73" name="Reporting" parent="base.menu_purchase_root"/>
83
<menuitem action="action_order_product_tree_all" id="menu_report_order_product_all"
84
name="PO by Products" parent="next_id_73"/>
86
<!-- Purchases by category by month -->
88
<record id="view_order_category_form" model="ir.ui.view">
89
<field name="name">report.purchase.order.category.form</field>
90
<field name="model">report.purchase.order.category</field>
91
<field name="type">form</field>
92
<field name="arch" type="xml">
93
<form string="Purchases by Category of Products">
94
<field name="name" select="1"/>
95
<field name="month" select="1"/>
96
<field name="category_id" select="1"/>
98
<field name="quantity" select="1"/>
99
<field name="price_total" select="1"/>
100
<field name="price_average" select="1"/>
101
<field name="state" select="1"/>
106
<record model="ir.ui.view" id="view_product_category_graph">
107
<field name="name">product.category.graph</field>
108
<field name="model">report.purchase.order.category</field>
109
<field name="type">graph</field>
110
<field name="arch" type="xml">
111
<graph string="Purchases by Category of Products" type="bar">
112
<field name="category_id"/>
113
<field name="quantity" operator="+"/>
114
<field name="price_total" operator="+"/>
119
<record id="view_order_category_tree" model="ir.ui.view">
120
<field name="name">report.purchase.order.category.tree</field>
121
<field name="model">report.purchase.order.category</field>
122
<field name="type">tree</field>
123
<field name="arch" type="xml">
124
<tree string="Purchases by Category of Products">
126
<field name="month"/>
127
<field name="category_id"/>
128
<field name="count"/>
129
<field name="quantity"/>
130
<field name="price_total"/>
131
<field name="price_average"/>
132
<field name="state"/>
137
<record id="view_order_category_search" model="ir.ui.view">
138
<field name="name">report.purchase.order.category.search</field>
139
<field name="model">report.purchase.order.category</field>
140
<field name="type">search</field>
141
<field name="arch" type="xml">
142
<search string="Purchases by category of products">
143
<group col="8" colspan="4">
144
<filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by categories of products during this year"/>
145
<filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by categories of products during this month"/>
146
<separator orientation="vertical"/>
147
<field name="name" select="1"/>
148
<field name="month" select="1"/>
149
<field name="category_id" select="1"/>
150
<field name="state" select="1"/>
156
<record id="action_order_category_tree_all" model="ir.actions.act_window">
157
<field name="name">Purchases by Category of Products</field>
158
<field name="res_model">report.purchase.order.category</field>
159
<field name="view_type">form</field>
160
<field name="view_mode">tree,graph</field>
161
<field name="search_view_id" ref="view_order_category_search"/>
163
<menuitem action="action_order_category_tree_all" id="menu_report_order_category_all"
164
name="PO by Products Category" parent="report_purchase.next_id_73"/>
166
<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"/>
168
<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"/>
6
<field name="model">report.purchase.order</field>
7
<field name="type">graph</field>
8
<field name="arch" type="xml">
9
<graph string="Purchase Orders Statistics" type="bar">
10
<field name="product_id"/>
11
<field name="quantity" operator="+"/>
12
<field name="price_total" operator="+"/>
17
<record id="view_purchase_order_tree" model="ir.ui.view">
18
<field name="name">report.purchase.order.tree</field>
19
<field name="model">report.purchase.order</field>
20
<field name="type">tree</field>
21
<field name="arch" type="xml">
22
<tree string="Purchase Orders Statistics">
25
<field name="partner_id"/>
26
<field name="product_id"/>
27
<field name="user_id" invisible="1"/>
28
<field name="warehouse_id" invisible="1"/>
29
<field name="category_id" invisible="1"/>
30
<field name="date" invisible="1"/>
31
<field name="company_id" invisible="1"/>
33
<field name="quantity"/>
34
<field name="price_total"/>
35
<field name="price_average"/>
41
<record id="view_purchase_order_search" model="ir.ui.view">
42
<field name="name">report.purchase.order.search</field>
43
<field name="model">report.purchase.order</field>
44
<field name="type">search</field>
45
<field name="arch" type="xml">
46
<search string="Purchase Orders">
47
<filter icon="terp-purchase"
49
domain="[('name','=',time.strftime('%%Y'))]"
51
help="Purchase orders of the year"/>
52
<filter icon="terp-purchase"
55
domain="[('month','=',time.strftime('%%m'))]"
56
help="Purchase orders of this month"/>
57
<separator orientation="vertical"/>
58
<filter icon="terp-purchase"
60
domain="[('state','=','draft')]"/>
61
<filter icon="terp-purchase"
64
domain="[('state','<>','draft'),('state','<>','cancel')]"/>
65
<separator orientation="vertical"/>
66
<field name="product_id"/>
67
<field name="user_id" widget="selection">
68
<filter icon="terp-purchase"
70
domain="[('user_id','=',uid)]"/>
72
<field name="partner_id"/>
73
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
76
<group expand="1" string="Group By..." colspan="10" col="12">
77
<filter string="Company" icon="terp-purchase" context="{'group_by':'company_id'}"/>
78
<filter string="Warehouse" icon="terp-purchase" context="{'group_by':'warehouse_id'}"/>
79
<filter string="Responsible" icon="terp-purchase" context="{'group_by':'user_id'}" default="1"/>
80
<separator orientation="vertical"/>
81
<filter string="Product" icon="terp-purchase" context="{'group_by':'product_id'}"/>
82
<filter string="Product Category" icon="terp-purchase" context="{'group_by':'category_id'}"/>
83
<filter string="Partner" icon="terp-purchase" context="{'group_by':'partner_id'}"/>
84
<filter string="State" icon="terp-purchase" context="{'group_by':'state'}"/>
85
<separator orientation="vertical"/>
86
<filter string="Month" icon="terp-purchase" context="{'group_by':'date'}"/>
87
<filter string="Year" icon="terp-purchase" context="{'group_by':'name'}"/>
93
<record id="action_purchase_order_report_all" model="ir.actions.act_window">
94
<field name="name">Purchase Orders</field>
95
<field name="res_model">report.purchase.order</field>
96
<field name="view_type">form</field>
97
<field name="view_mode">tree,graph</field>
98
<field name="search_view_id" ref="view_purchase_order_search"/>
101
<menuitem id="base.next_id_73" name="Reporting" parent="base.menu_purchase_root" sequence="8"/>
102
<menuitem action="action_purchase_order_report_all" id="menu_action_purchase_order_report_all" parent="base.next_id_73" sequence="3"/>