[IMP]:account:improved the search view.
[odoo/odoo.git] / addons / account / report / account_invoice_report_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4     <record id="view_account_invoice_report_tree" model="ir.ui.view">
5         <field name="name">account.invoice.report.tree</field>
6         <field name="model">account.invoice.report</field>
7         <field name="type">tree</field>
8         <field name="arch" type="xml">
9             <tree string="Invoices Statistics">
10                 <field name="date"/>
11                 <field name="user_id"/>
12                 <field name="year" invisible="1"/>
13                 <field name="month" invisible="1"/>
14                 <field name="type" invisible="1"/>
15                 <field name="company_id" invisible="1"/>
16                 <field name="partner_id"/>
17                 <field name="product_id"/>
18                 <field name="product_qty"/>
19                 <!--field name="delay" avg="Days to Close"/-->
20                 <field name="nbr" sum="# of Lines"/>
21                 <field name="price_average" avg="Average Price"/>
22                 <field name="price_total" sum="Total Price"/>
23                 <field name="state" invisible="1"/>
24             </tree>
25         </field>
26     </record>
27
28     <record id="view_account_invoice_report_graph" model="ir.ui.view">
29          <field name="name">account.invoice.report.graph</field>
30          <field name="model">account.invoice.report</field>
31          <field name="type">graph</field>
32          <field name="arch" type="xml">
33              <graph string="Invoices Statistics" type="bar">
34                  <field name="product_id"/>
35                  <field name="price_total"/>
36              </graph>
37          </field>
38     </record>
39
40     <record id="view_account_invoice_report_search" model="ir.ui.view">
41         <field name="name">account.invoice.report.search</field>
42         <field name="model">account.invoice.report</field>
43         <field name="type">search</field>
44         <field name="arch" type="xml">
45             <search string="Invoices">
46                 <filter icon="terp-account"
47                     string="This Year"
48                     domain="[('year','=',time.strftime('%%Y'))]"
49                     help="Invoices of the year"/>
50                 <filter icon="terp-account"
51                     string="This Month"
52                     domain="[('month','=',time.strftime('%%m'))]"
53                     help="Invoices of this month"/>
54                 <separator orientation="vertical"/>
55                 <filter icon="terp-account"
56                     string="Draft"
57                     domain="[('state','=','draft')]"/>
58                 <filter icon="terp-account"
59                     string="Invoices"
60                     domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
61                 <separator orientation="vertical"/>
62                 <field name="product_id"/>
63                 <field name="user_id" widget="selection">
64                     <filter icon="terp-account"
65                         string="My Invoices"
66                         domain="[('user_id','=',uid)]"/>
67                 </field>
68                 <field name="partner_id"/>
69                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
70
71                 <newline/>
72                 <group expand="1" string="Extended options..." colspan="10" col="12">
73                     <filter icon="terp-account"
74                                 string="Customer Invoices"
75                                 domain="[('type','=','out_invoice')]"/>
76                     <filter icon="terp-account"
77                                 string="Supplier Invoices"
78                                 domain="[('type','=','in_invoice')]"/>
79                     <filter icon="terp-account"
80                                 string="Customer Refunds"
81                                 domain="[('type','=','out_refund')]"/>
82                     <filter icon="terp-account"
83                                 string="Supplier Refunds"
84                                 domain="[('type','=','in_refund')]"/>
85                 </group>
86                 <newline/>
87                 <group expand="1" string="Group By..." colspan="10" col="12">
88                     <filter string="Company" icon="terp-account" context="{'group_by':'company_id'}"/>
89                     <filter string="Salesman" icon="terp-account" context="{'group_by':'user_id'}" default="1"/>
90                     <separator orientation="vertical"/>
91                     <filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
92                     <filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
93                     <filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
94                     <separator orientation="vertical"/>
95                     <filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
96                     <filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
97                 </group>
98             </search>
99         </field>
100     </record>
101
102     <record id="action_account_invoice_report_all" model="ir.actions.act_window">
103         <field name="name">Invoices</field>
104         <field name="res_model">account.invoice.report</field>
105         <field name="view_type">form</field>
106         <field name="view_mode">tree,graph</field>
107         <field name="search_view_id" ref="view_account_invoice_report_search"/>
108     </record>
109
110     <menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_reporting" sequence="0"/>
111
112 </data>
113 </openerp>