[MERGE]
[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                 <group>
47                 <filter icon="terp-account"
48                     string="This Year"
49                     domain="[('year','=',time.strftime('%%Y'))]"
50                     help="Invoices of the year"/>
51                 <filter icon="terp-account"
52                     string="This Month"
53                     domain="[('month','=',time.strftime('%%m'))]"
54                     help="Invoices of this month"/>
55                 <separator orientation="vertical"/>
56                 <filter icon="terp-account"
57                     string="Draft"
58                     domain="[('state','=','draft')]"/>
59                 <filter icon="terp-account"
60                     string="Invoices"
61                     domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
62                 <filter icon="terp-account"
63                     string="Paid"
64                     domain="[('state','=','paid')]"/>
65                 <separator orientation="vertical"/>
66                 <field name="product_id"/>
67                 <field name="user_id" widget="selection">
68                     <filter icon="terp-account"
69                         string="My Invoices"
70                         domain="[('user_id','=',uid)]"/>
71                 </field>
72                 <field name="partner_id"/>
73                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
74                                 </group>
75                 <newline/>
76                 <group expand="1" string="Extended options..." colspan="10" col="12">
77                     <filter icon="terp-account"
78                         string="Customer Invoices"
79                         domain="[('type','=','out_invoice')]"
80                         default="1"/>
81                     <filter icon="terp-account"
82                         string="Customer Refunds"
83                         domain="[('type','=','out_refund')]"/>
84                     <separator orientation="vertical"/>
85                     <filter icon="terp-account"
86                         string="Supplier Invoices"
87                         domain="[('type','=','in_invoice')]"/>
88                     <filter icon="terp-account"
89                         string="Supplier Refunds"
90                         domain="[('type','=','in_refund')]"/>
91                 </group>
92                 <newline/>
93                 <group expand="1" string="Group By..." colspan="10" col="12">
94                     <filter string="Company" icon="terp-account" context="{'group_by':'company_id'}"/>
95                     <filter string="Salesman" icon="terp-account" context="{'group_by':'user_id'}" default="1"/>
96                     <separator orientation="vertical"/>
97                     <filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
98                     <filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
99                     <filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
100                     <filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
101                     <separator orientation="vertical"/>
102                     <filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
103                     <filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
104                 </group>
105             </search>
106         </field>
107     </record>
108
109     <record id="action_account_invoice_report_all" model="ir.actions.act_window">
110         <field name="name">Invoices</field>
111         <field name="res_model">account.invoice.report</field>
112         <field name="view_type">form</field>
113         <field name="view_mode">tree,graph</field>
114         <field name="search_view_id" ref="view_account_invoice_report_search"/>
115     </record>
116
117     <menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_reporting" sequence="0"/>
118
119 </data>
120 </openerp>