1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale_report_view_search_website" model="ir.ui.view">
<field name="name">sale.report.search</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<search string="Sales">
<field name="website_id" groups="website.group_multi_website"/>
<field name="product_id"/>
<field name="categ_id"/>
<field name="partner_id"/>
<field name="country_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<filter string="Confirmed Orders" name="confirmed" domain="[('state', 'in', ['sale', 'done'])]"/>
<separator/>
<filter name="filter_date" date="date" default_period="this_month"/>
<group expand="0" string="Group By">
<filter string="Website" name="groupby_website" context="{'group_by':'website_id'}" groups="website.group_multi_website"/>
<filter string="Product" name="groupby_product" context="{'group_by':'product_id'}"/>
<filter string="Product Category" name="groupby_product_category" context="{'group_by':'categ_id'}"/>
<filter string="Customer" name="groupby_customer" context="{'group_by':'partner_id'}"/>
<filter string="Customer Country" name="groupby_country" context="{'group_by':'country_id'}"/>
<filter string="Status" name="groupby_status" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Order Date" name="groupby_order_date" context="{'group_by':'date'}"/>
<!-- Dashboard filter - used by context -->
<filter string="Last Week" invisible="1" name="week" domain="[('date','>=', (context_today() - datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
<filter string="Last Month" invisible="1" name="month" domain="[('date','>=', (context_today() - datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
<filter string="Last Year" invisible="1" name="year" domain="[('date','>=', (context_today() - datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
</group>
</search>
</field>
</record>
<record id="sale_report_view_pivot_website" model="ir.ui.view">
<field name="name">sale.report.view.pivot.website</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<pivot string="Sales Report" disable_linking="True" sample="1">
<field name="date" type="row"/>
<field name="state" type="col"/>
<field name="price_subtotal" type="measure"/>
</pivot>
</field>
</record>
<record id="sale_report_view_graph_website" model="ir.ui.view">
<field name="name">sale.report.view.graph.website</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="Sale Report" type="bar" sample="1" disable_linking="1">
<field name="date"/>
<field name="price_subtotal" type='measure'/>
</graph>
</field>
</record>
<record id="sale_report_action_dashboard" model="ir.actions.act_window">
<field name="name">Online Sales Analysis</field>
<field name="res_model">sale.report</field>
<field name="view_mode">pivot,graph</field>
<field name="domain">[('state','in',('sale', 'done')), ('website_id', '!=', False)]</field>
<field name="search_view_id" ref="sale_report_view_search_website"/>
<field name="help" type="html">
<p class="o_view_nocontent_empty_folder">
You don't have any order from the website
</p>
</field>
</record>
<record id="sale_report_action_view_pivot_website" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">pivot</field>
<field name="view_id" ref="sale_report_view_pivot_website"/>
<field name="act_window_id" ref="sale_report_action_dashboard"/>
</record>
<record id="sale_report_action_view_graph_website" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="sale_report_view_graph_website"/>
<field name="act_window_id" ref="sale_report_action_dashboard"/>
</record>
<record id="sale_report_action_carts" model="ir.actions.act_window">
<field name="name">Sales</field>
<field name="res_model">sale.report</field>
<field name="view_mode">pivot,graph</field>
<field name="domain">[('website_id', '!=', False)]</field>
<field name="search_view_id" ref="sale_report_view_search_website"/>
<field name="help" type="html">
<p class="o_view_nocontent_empty_folder">
You don't have any order from the website
</p>
</field>
</record>
<record id="sale_report_action_view_pivot_carts" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">pivot</field>
<field name="view_id" ref="sale_report_view_pivot_website"/>
<field name="act_window_id" ref="sale_report_action_carts"/>
</record>
<record id="sale_report_action_view_graph_carts" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="sale_report_view_graph_website"/>
<field name="act_window_id" ref="sale_report_action_carts"/>
</record>
</odoo>
|