1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_order_product_tree" model="ir.ui.view">
6 <field name="name">sale.report.tree</field>
7 <field name="model">sale.report</field>
8 <field name="type">tree</field>
9 <field name="arch" type="xml">
10 <tree string="Sales Analysis">
11 <field name="date" invisible="1"/>
12 <field name="user_id" invisible="1"/>
13 <field name="year" invisible="1"/>
14 <field name="day" invisible="1"/>
15 <field name="month" invisible="1"/>
16 <field name="shop_id" invisible="1"/>
17 <field name="company_id" invisible="1" groups="base.group_multi_company"/>
18 <field name="partner_id" invisible="1"/>
19 <field name="product_id" invisible="1"/>
20 <field name="categ_id" invisible="1"/>
21 <field name="nbr" sum="# of Lines"/>
22 <field name="product_uom_qty" sum="# of Qty"/>
23 <field name="shipped_qty_1"/>
24 <field name="uom_name" invisible="not context.get('set_visible',False)"/>
25 <field name="price_average" avg="Average Price"/>
26 <field name="price_total" sum="Total Price"/>
27 <field name="delay" avg="Days to Close"/>
28 <field name="state" invisible="1"/>
29 <field name="analytic_account_id" invisible="1"/>
34 <record id="view_order_product_graph" model="ir.ui.view">
35 <field name="name">sale.report.graph</field>
36 <field name="model">sale.report</field>
37 <field name="type">graph</field>
38 <field name="arch" type="xml">
39 <graph string="Sales Analysis" type="bar">
40 <field name="product_id"/>
41 <field name="price_total"/>
42 <field name="state" group="True"/>
47 <record id="view_order_product_search" model="ir.ui.view">
48 <field name="name">sale.report.search</field>
49 <field name="model">sale.report</field>
50 <field name="type">search</field>
51 <field name="arch" type="xml">
52 <search string="Sales Analysis">
54 <filter icon="terp-go-year" string=" 365 Days "
55 domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
56 help="Tasks performed in last 365 days"/>
57 <filter icon="terp-go-month" string=" 30 Days "
59 domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
60 help="Tasks performed in last 30 days"/>
61 <filter icon="terp-go-week"
64 domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
65 help="Tasks during last 7 days"/>
66 <separator orientation="vertical"/>
67 <filter icon="terp-document-new"
69 domain="[('state','=','draft')]"/>
70 <filter icon="terp-dolar"
72 domain="[('state','not in',('draft','done','cancel'))]"/>
73 <separator orientation="vertical"/>
74 <filter icon="terp-sale"
76 domain="[('shipped','=',True)]"/>
77 <separator orientation="vertical"/>
78 <field name="partner_id"/>
79 <field name="product_id"/>
80 <field name="user_id" widget="selection">
81 <filter icon="terp-dolar"
84 domain="[('user_id','=',uid)]"/>
88 <group expand="0" string="Group By..." colspan="10" col="12">
89 <filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
90 <filter string="Shop" icon="terp-go-home" context="{'group_by':'shop_id'}"/>
91 <filter string="Company" icon="terp-go-home" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
92 <separator orientation="vertical"/>
93 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
94 <filter string="Default UoM" icon="terp-mrp" context="{'group_by':'uom_name'}"/>
95 <filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
96 <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
97 <separator orientation="vertical"/>
98 <filter string="Pricelist" icon="terp-dolar" context="{'group_by':'pricelist_id'}"/>
99 <filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}"/>
100 <filter string="Category of Product" icon="terp-stock_symbol-selection" context="{'group_by':'categ_id'}"/>
101 <separator orientation="vertical"/>
102 <filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
103 <filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
104 <filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
107 <group expand="0" string="Extended options..." groups="base.group_extended">
109 <field name="date_confirm"/>
110 <separator orientation="vertical"/>
111 <field name="shop_id" widget="selection"/>
112 <field name="state"/>
113 <field name="categ_id" widget="selection"/>
114 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
120 <record id="action_order_report_all" model="ir.actions.act_window">
121 <field name="name">Sales Analysis</field>
122 <field name="res_model">sale.report</field>
123 <field name="view_type">form</field>
124 <field name="view_mode">tree,graph</field>
125 <field name="search_view_id" ref="view_order_product_search"/>
126 <field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
129 <menuitem id="base.next_id_64" name="Reporting" parent="base.menu_base_partner" sequence="8"/>
130 <menuitem action="action_order_report_all" id="menu_report_product_all" parent="base.next_id_64" sequence="3"/>
132 <!--This views used in board_sale module -->
133 <record id="view_sale_order_by_clients_tree" model="ir.ui.view">
134 <field name="name">sale.order.by.clients.tree</field>
135 <field name="model">sale.order.by.clients</field>
136 <field name="type">tree</field>
137 <field name="arch" type="xml">
138 <tree string="Sales order by clients">
139 <field name="partner_id"/>
140 <field name="total_orders"/>
145 <record id="view_sale_order_by_clients_graph" model="ir.ui.view">
146 <field name="name">sale.order.by.clients.graph</field>
147 <field name="model">sale.order.by.clients</field>
148 <field name="type">graph</field>
149 <field name="arch" type="xml">
150 <graph string="Sales order by clients" type="bar">
151 <field name="partner_id" />
152 <field name="total_orders" operator="+"/>
157 <record id="action_sale_order_by_clients" model="ir.actions.act_window">
158 <field name="name">Sales Orders</field>
159 <field name="res_model">sale.order.by.clients</field>
160 <field name="view_type">form</field>
161 <field name="view_mode">tree,graph</field>
162 <field name="view_id" ref="view_sale_order_by_clients_tree"/>
165 <record id="view_uninvoiced_lines_per_month_tree" model="ir.ui.view">
166 <field name="name">uninvoiced.lines.per.month.tree</field>
167 <field name="model">uninvoiced.lines.per.month</field>
168 <field name="type">tree</field>
169 <field name="arch" type="xml">
170 <tree string="Uninvoiced lines per month">
172 <field name="month"/>
173 <field name="number_of_lines"/>
178 <record id="view_uninvoiced_lines_per_month_graph" model="ir.ui.view">
179 <field name="name">uninvoiced.lines.per.month.graph</field>
180 <field name="model">uninvoiced.lines.per.month</field>
181 <field name="type">graph</field>
182 <field name="arch" type="xml">
183 <graph string="Uninvoiced lines per month" type="bar">
184 <field name="month" />
185 <field name="number_of_lines" operator="+"/>
190 <record id="action_suninvoiced_lines_per_month" model="ir.actions.act_window">
191 <field name="name">Uninvoiced Lines</field>
192 <field name="res_model">uninvoiced.lines.per.month</field>
193 <field name="view_type">form</field>
194 <field name="view_mode">tree,graph</field>
195 <field name="view_id" ref="view_uninvoiced_lines_per_month_tree"/>
198 <record id="view_product_bought_by_sale_order_tree" model="ir.ui.view">
199 <field name="name">product.bought.by.sale.order.tree</field>
200 <field name="model">product.bought.by.sale.order</field>
201 <field name="type">tree</field>
202 <field name="arch" type="xml">
203 <tree string="Product bought by sale order">
204 <field name="product_id"/>
205 <field name="month"/>
207 <field name="total_products"/>
212 <record id="view_product_bought_by_sale_order_graph" model="ir.ui.view">
213 <field name="name">product.bought.by.sale.order.graph</field>
214 <field name="model">product.bought.by.sale.order</field>
215 <field name="type">graph</field>
216 <field name="arch" type="xml">
217 <graph string="Product bought by sale order" type="bar">
218 <field name="product_id" select="1"/>
219 <field name="total_products" select="1"/>
220 <field name="month" group = "True"/>
225 <record id="action_product_bought_by_sale_order" model="ir.actions.act_window">
226 <field name="name">Product bought by sale order</field>
227 <field name="res_model">product.bought.by.sale.order</field>
228 <field name="view_type">form</field>
229 <field name="view_mode">graph,tree</field>
230 <field name="domain">[('year','=', time.strftime('%Y'))]</field>
231 <field name="view_id" ref="view_product_bought_by_sale_order_tree"/>
234 <record id="view_sales_by_regions_tree" model="ir.ui.view">
235 <field name="name">sales.by.regions.tree</field>
236 <field name="model">sales.by.regions</field>
237 <field name="type">tree</field>
238 <field name="arch" type="xml">
239 <tree string="Sales by regions">
241 <field name="total_sales"/>
246 <record id="view_sales_by_regions_graph" model="ir.ui.view">
247 <field name="name">sales.by.regions.graph</field>
248 <field name="model">sales.by.regions</field>
249 <field name="type">graph</field>
250 <field name="arch" type="xml">
251 <graph string="Sales by regions" type="bar">
253 <field name="total_sales" operator="+"/>
258 <record id="action_sales_by_regions" model="ir.actions.act_window">
259 <field name="name">Sales by regions</field>
260 <field name="res_model">sales.by.regions</field>
261 <field name="view_type">form</field>
262 <field name="view_mode">tree,graph</field>
263 <field name="view_id" ref="view_sales_by_regions_tree"/>