~jgrandguillaume-c2c/openobject-addons/multi-company-cost-price

« back to all changes in this revision

Viewing changes to purchase/report/purchase_report_view.xml

  • Committer: Joël Grand-Guillaume
  • Date: 2010-04-08 09:00:10 UTC
  • mfrom: (2533.3.664)
  • Revision ID: joel.grandguillaume@camptocamp.com-20100408090010-c0pqjan341s18bxs
[MRG] Merge from last trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<openerp>
3
3
    <data>
4
 
 
5
 
        <!-- Purchases by products by month -->
6
 
        <record id="view_order_product_form" model="ir.ui.view">
7
 
            <field name="name">report.purchase.order.product.form</field>
8
 
            <field name="model">report.purchase.order.product</field>
9
 
            <field name="type">form</field>
10
 
            <field name="arch" type="xml">
11
 
                <form string="Purchases by products">
12
 
                    <field name="name" select="1"/>
13
 
                    <field name="month" select="1"/>
14
 
                    <field name="product_id" select="1"/>
15
 
                    <field name="count"/>
16
 
                    <field name="quantity" select="1"/>
17
 
                    <field name="price_total" select="1"/>
18
 
                    <field name="price_average" select="1"/>
19
 
                    <field name="state" select="1"/>
20
 
                </form>
21
 
            </field>
22
 
        </record>
23
 
 
24
 
        <record model="ir.ui.view" id="view_product_month_graph">
 
4
        <record model="ir.ui.view" id="view_purchase_order_graph">
25
5
            <field name="name">product.month.graph</field>
26
 
            <field name="model">report.purchase.order.product</field>
27
 
            <field name="type">graph</field>
28
 
            <field name="arch" type="xml">
29
 
                <graph string="Purchases by products" type="bar">
30
 
                    <field name="product_id"/>
31
 
                    <field name="quantity" operator="+"/>
32
 
                    <field name="price_total" operator="+"/>
33
 
                </graph>
34
 
            </field>
35
 
        </record>
36
 
 
37
 
        <record id="view_order_product_tree" model="ir.ui.view">
38
 
            <field name="name">report.purchase.order.product.tree</field>
39
 
            <field name="model">report.purchase.order.product</field>
40
 
            <field name="type">tree</field>
41
 
            <field name="arch" type="xml">
42
 
                <tree string="Purchases by products">
43
 
                    <field name="name"/>
44
 
                    <field name="month"/>
45
 
                    <field name="product_id"/>
46
 
                    <field name="count"/>
47
 
                    <field name="quantity"/>
48
 
                    <field name="price_total"/>
49
 
                    <field name="price_average"/>
50
 
                    <field name="state"/>
51
 
                </tree>
52
 
            </field>
53
 
        </record>
54
 
 
55
 
        <record id="view_order_product_search" model="ir.ui.view">
56
 
            <field name="name">report.purchase.order.product.search</field>
57
 
            <field name="model">report.purchase.order.product</field>
58
 
            <field name="type">search</field>
59
 
            <field name="arch" type="xml">
60
 
                <search string="Purchases by products">
61
 
                        <group col="8" colspan="4">
62
 
                                <filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by products during this year"/>
63
 
                                <filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by products during this month"/>
64
 
                                <separator orientation="vertical"/>
65
 
                                <field name="name" select="1"/>
66
 
                            <field name="month" select="1"/>
67
 
                            <field name="product_id" select="1"/>
68
 
                            <field name="state" select="1"/>
69
 
                        </group>
70
 
                </search>
71
 
            </field>
72
 
        </record>
73
 
 
74
 
        <record id="action_order_product_tree_all" model="ir.actions.act_window">
75
 
            <field name="name">Purchases by Products</field>
76
 
            <field name="res_model">report.purchase.order.product</field>
77
 
            <field name="view_type">form</field>
78
 
            <field name="view_mode">tree,graph</field>
79
 
            <field name="search_view_id" ref="view_order_product_search"/>
80
 
        </record>
81
 
 
82
 
        <menuitem id="next_id_73" name="Reporting" parent="base.menu_purchase_root"/>
83
 
        <menuitem action="action_order_product_tree_all" id="menu_report_order_product_all"
84
 
                name="PO by Products" parent="next_id_73"/>
85
 
 
86
 
        <!-- Purchases by category by month -->
87
 
 
88
 
        <record id="view_order_category_form" model="ir.ui.view">
89
 
            <field name="name">report.purchase.order.category.form</field>
90
 
            <field name="model">report.purchase.order.category</field>
91
 
            <field name="type">form</field>
92
 
            <field name="arch" type="xml">
93
 
                <form string="Purchases by Category of Products">
94
 
                    <field name="name" select="1"/>
95
 
                    <field name="month" select="1"/>
96
 
                    <field name="category_id" select="1"/>
97
 
                    <field name="count"/>
98
 
                    <field name="quantity" select="1"/>
99
 
                    <field name="price_total" select="1"/>
100
 
                    <field name="price_average" select="1"/>
101
 
                    <field name="state" select="1"/>
102
 
                </form>
103
 
            </field>
104
 
        </record>
105
 
 
106
 
        <record model="ir.ui.view" id="view_product_category_graph">
107
 
            <field name="name">product.category.graph</field>
108
 
            <field name="model">report.purchase.order.category</field>
109
 
            <field name="type">graph</field>
110
 
            <field name="arch" type="xml">
111
 
                <graph string="Purchases by Category of Products" type="bar">
112
 
                    <field name="category_id"/>
113
 
                    <field name="quantity" operator="+"/>
114
 
                    <field name="price_total" operator="+"/>
115
 
                </graph>
116
 
            </field>
117
 
        </record>
118
 
 
119
 
        <record id="view_order_category_tree" model="ir.ui.view">
120
 
            <field name="name">report.purchase.order.category.tree</field>
121
 
            <field name="model">report.purchase.order.category</field>
122
 
            <field name="type">tree</field>
123
 
            <field name="arch" type="xml">
124
 
                <tree string="Purchases by Category of Products">
125
 
                    <field name="name"/>
126
 
                    <field name="month"/>
127
 
                    <field name="category_id"/>
128
 
                    <field name="count"/>
129
 
                    <field name="quantity"/>
130
 
                    <field name="price_total"/>
131
 
                    <field name="price_average"/>
132
 
                    <field name="state"/>
133
 
                </tree>
134
 
            </field>
135
 
        </record>
136
 
 
137
 
                <record id="view_order_category_search" model="ir.ui.view">
138
 
            <field name="name">report.purchase.order.category.search</field>
139
 
            <field name="model">report.purchase.order.category</field>
140
 
            <field name="type">search</field>
141
 
            <field name="arch" type="xml">
142
 
                <search string="Purchases by category of products">
143
 
                        <group col="8" colspan="4">
144
 
                                <filter icon="terp-purchase" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Purchases by categories of products during this year"/>
145
 
                                <filter icon="terp-purchase" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Purchases by categories of products during this month"/>
146
 
                                <separator orientation="vertical"/>
147
 
                                <field name="name" select="1"/>
148
 
                            <field name="month" select="1"/>
149
 
                            <field name="category_id" select="1"/>
150
 
                            <field name="state" select="1"/>
151
 
                        </group>
152
 
                </search>
153
 
            </field>
154
 
        </record>
155
 
 
156
 
        <record id="action_order_category_tree_all" model="ir.actions.act_window">
157
 
            <field name="name">Purchases by Category of Products</field>
158
 
            <field name="res_model">report.purchase.order.category</field>
159
 
            <field name="view_type">form</field>
160
 
            <field name="view_mode">tree,graph</field>
161
 
            <field name="search_view_id" ref="view_order_category_search"/>
162
 
        </record>
163
 
        <menuitem action="action_order_category_tree_all" id="menu_report_order_category_all"
164
 
                name="PO by Products Category" parent="report_purchase.next_id_73"/>
165
 
 
166
 
        <act_window domain="[('product_id', '=', active_id)]" id="act_product_product_2_report_purchases_order_product" name="Monthly purchases" res_model="report.purchase.order.product" src_model="product.product"/>
167
 
 
168
 
        <act_window domain="[('category_id', '=', active_id)]" id="act_product_category_2_report_purchase_order_category" name="Monthly purchases" res_model="report.purchase.order.category" src_model="product.category"/>
 
6
            <field name="model">report.purchase.order</field>
 
7
            <field name="type">graph</field>
 
8
            <field name="arch" type="xml">
 
9
                <graph string="Purchase Orders Statistics" type="bar">
 
10
                    <field name="product_id"/>
 
11
                    <field name="quantity" operator="+"/>
 
12
                    <field name="price_total" operator="+"/>
 
13
                </graph>
 
14
            </field>
 
15
        </record>
 
16
 
 
17
        <record id="view_purchase_order_tree" model="ir.ui.view">
 
18
            <field name="name">report.purchase.order.tree</field>
 
19
            <field name="model">report.purchase.order</field>
 
20
            <field name="type">tree</field>
 
21
            <field name="arch" type="xml">
 
22
                <tree string="Purchase Orders Statistics">
 
23
                    <field name="name"/>
 
24
                    <field name="month"/>
 
25
                    <field name="partner_id"/>
 
26
                    <field name="product_id"/>
 
27
                    <field name="user_id" invisible="1"/>
 
28
                    <field name="warehouse_id" invisible="1"/>
 
29
                    <field name="category_id" invisible="1"/>
 
30
                    <field name="date" invisible="1"/>
 
31
                    <field name="company_id" invisible="1"/>
 
32
                    <field name="count"/>
 
33
                    <field name="quantity"/>
 
34
                    <field name="price_total"/>
 
35
                    <field name="price_average"/>
 
36
                    <field name="state"/>
 
37
                </tree>
 
38
            </field>
 
39
        </record>
 
40
 
 
41
        <record id="view_purchase_order_search" model="ir.ui.view">
 
42
        <field name="name">report.purchase.order.search</field>
 
43
        <field name="model">report.purchase.order</field>
 
44
        <field name="type">search</field>
 
45
        <field name="arch" type="xml">
 
46
            <search string="Purchase Orders">
 
47
                <filter icon="terp-purchase"
 
48
                    string="This Year"
 
49
                    domain="[('name','=',time.strftime('%%Y'))]"
 
50
                    default="1"
 
51
                    help="Purchase orders of the year"/>
 
52
                <filter icon="terp-purchase"
 
53
                    string="This Month"
 
54
                    default="1"
 
55
                    domain="[('month','=',time.strftime('%%m'))]"
 
56
                    help="Purchase orders of this month"/>
 
57
                <separator orientation="vertical"/>
 
58
                <filter icon="terp-purchase"
 
59
                    string="Quotations"
 
60
                    domain="[('state','=','draft')]"/>
 
61
                <filter icon="terp-purchase"
 
62
                    string="Purchase"
 
63
                    default="1"
 
64
                    domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
 
65
                <separator orientation="vertical"/>
 
66
                <field name="product_id"/>
 
67
                <field name="user_id" widget="selection">
 
68
                    <filter icon="terp-purchase"
 
69
                        string="My Purchases"
 
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
 
 
75
                <newline/>
 
76
                <group expand="1" string="Group By..." colspan="10" col="12">
 
77
                    <filter string="Company" icon="terp-purchase" context="{'group_by':'company_id'}"/>
 
78
                    <filter string="Warehouse" icon="terp-purchase" context="{'group_by':'warehouse_id'}"/>
 
79
                    <filter string="Responsible" icon="terp-purchase" context="{'group_by':'user_id'}" default="1"/>
 
80
                    <separator orientation="vertical"/>
 
81
                    <filter string="Product" icon="terp-purchase" context="{'group_by':'product_id'}"/>
 
82
                    <filter string="Product Category" icon="terp-purchase" context="{'group_by':'category_id'}"/>
 
83
                    <filter string="Partner" icon="terp-purchase" context="{'group_by':'partner_id'}"/>
 
84
                    <filter string="State" icon="terp-purchase" context="{'group_by':'state'}"/>
 
85
                    <separator orientation="vertical"/>
 
86
                    <filter string="Month" icon="terp-purchase" context="{'group_by':'date'}"/>
 
87
                    <filter string="Year" icon="terp-purchase" context="{'group_by':'name'}"/>
 
88
                </group>
 
89
            </search>
 
90
        </field>
 
91
    </record>
 
92
 
 
93
    <record id="action_purchase_order_report_all" model="ir.actions.act_window">
 
94
        <field name="name">Purchase Orders</field>
 
95
        <field name="res_model">report.purchase.order</field>
 
96
        <field name="view_type">form</field>
 
97
        <field name="view_mode">tree,graph</field>
 
98
        <field name="search_view_id" ref="view_purchase_order_search"/>
 
99
    </record>
 
100
 
 
101
    <menuitem id="base.next_id_73" name="Reporting" parent="base.menu_purchase_root" sequence="8"/>
 
102
    <menuitem action="action_purchase_order_report_all" id="menu_action_purchase_order_report_all" parent="base.next_id_73" sequence="3"/>
169
103
 
170
104
    </data>
171
105
</openerp>