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