~txerpa-openerp/openobject-addons/6.0

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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <menuitem
            id="menu_purchase_deshboard"
            name="Dashboard"
            parent="base.next_id_73" sequence="0"/>

        <record id="purchase_draft" model="ir.actions.act_window">
            <field name="name">Request for Quotations</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
            <field name="search_view_id" ref="purchase.purchase_order_tree"/>
        </record>
        <record id="purchase_waiting" model="ir.actions.act_window">
            <field name="name">Purchase Order Waiting Approval</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
            <field name="search_view_id" ref="purchase.purchase_order_tree"/>
        </record>

		<record model="ir.ui.view" id="view_purchase_order_monthly_categ_tree">
            <field name="name">purchase.order.monthly.categ.tree</field>
            <field name="model">purchase.report</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Monthly Purchase by Category">
                    <field name="month"/>
                    <field name="category_id"/>
                    <field name="price_total"/>
                    <field name="user_id" invisible="1"/>
                    <field name="partner_id" invisible="1"/>
                    <field name="product_id" invisible="1"/>
                    <field name="product_uom" invisible="1"/>
                    <field name="day" invisible="1"/>
                    <field name="name" invisible="1"/>
                    <field name="warehouse_id" invisible="1"/>
                    <field name="validator" invisible="1"/>
                    <field name="company_id" invisible="1"/>
                    <field name="state" invisible="1"/>
                    <field name="location_id" invisible="1"/>
                </tree>
            </field>
        </record>
    	<record model="ir.ui.view" id="view_purchase_order_monthly_categ_graph">
            <field name="name">purchase.order.monthly.categ.graph</field>
            <field name="model">purchase.report</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Monthly Purchase by Category" type="bar">
                    <field name="month"/>
                    <field name="price_total" operator="+"/>
                    <field name="category_id" group="True"/>
                </graph>
            </field>
        </record>
	    <record id="action_purchase_order_monthly_categ_graph" model="ir.actions.act_window">
	        <field name="name">Monthly Purchase by Category</field>
	        <field name="res_model">purchase.report</field>
	        <field name="view_type">form</field>
	        <field name="view_mode">graph,tree</field>
		<field name="context">{'group_by':['month','category_id'],'group_by_no_leaf':1}</field>
	        <field name="view_id" ref="view_purchase_order_monthly_categ_graph"></field>
	    </record>
	    <record id="open_view_purchase_order_monthly_categ_tree" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_purchase_order_monthly_categ_tree"/>
            <field name="act_window_id" ref="action_purchase_order_monthly_categ_graph"/>
	    </record>
	    <record id="open_view_purchase_order_monthly_categ_graph" model="ir.actions.act_window.view">
	            <field eval="1" name="sequence"/>
	            <field name="view_mode">graph</field>
	            <field name="view_id" ref="view_purchase_order_monthly_categ_graph"/>
	            <field name="act_window_id" ref="action_purchase_order_monthly_categ_graph"/>
	    </record>

        <record model="ir.ui.view" id="view_negotiation_by_supplier_tree">
            <field name="name">negotiation.by.supplier.tree</field>
            <field name="model">purchase.report</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Negotiation by Supplier">
                    <field name="partner_id"/>
                    <field name="negociation"/>
                </tree>
            </field>
        </record>
        <record model="ir.ui.view" id="view_negotiation_by_supplier_graph">
            <field name="name">negotiation.by.supplier.graph</field>
            <field name="model">purchase.report</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Negotiation by Supplier" type="bar">
                    <field name="partner_id"/>
                    <field name="negociation"/>
                </graph>
            </field>
        </record>
		<record id="action_negotiation_by_supplier" model="ir.actions.act_window">
	        <field name="name">Negotiation by Supplier</field>
	        <field name="res_model">purchase.report</field>
	        <field name="view_type">form</field>
	        <field name="view_mode">graph,tree</field>
		<field name="context">{'group_by':['partner_id'],'group_by_no_leaf':1}</field>
	        <field name="view_id" ref="view_negotiation_by_supplier_graph"/>
	    </record>
	    <record id="open_view_negotiation_by_supplier_tree" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_negotiation_by_supplier_tree"/>
            <field name="act_window_id" ref="action_negotiation_by_supplier"/>
	    </record>
	    <record id="open_view_negotiation_by_supplier_graph" model="ir.actions.act_window.view">
	            <field eval="1" name="sequence"/>
	            <field name="view_mode">graph</field>
	            <field name="view_id" ref="view_negotiation_by_supplier_graph"/>
	            <field name="act_window_id" ref="action_negotiation_by_supplier"/>
	    </record>

        <record id="board_purchase_form" model="ir.ui.view">
            <field name="name">board.purchase.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="My Board">
                    <hpaned>
                        <child1>
                        <!--
                            <action colspan="4" height="220" name="%(purchase.action_current_purchases)d" string="Current purchases"  width="510"/>
                            <action colspan="4" height="220" name="%(purchase.action_po_per_month_tree)d" string="Purchase order per month"  width="510"/>
                        -->
                        	<action colspan="4" height="220" name="%(purchase_draft)d" string="Request for Quotations"  width="510"/>
                        	<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order Waiting Approval"  width="510"/>
                        </child1>
                        <child2>
                        	<action colspan="4" height="220" name="%(action_purchase_order_monthly_categ_graph)d" string="Monthly Purchase by Category"  />
                        <!--
                            <action colspan="4" height="220" name="%(purchase.action_purchase_by_supplier)d" string="Purchase by supplier"  />
                            <action colspan="4" height="220" name="%(purchase.action_total_price_by_product_by_state)d" string="Total price by product by state"  />
                            <action colspan="4" height="220" name="%(purchase.action_qty_per_product)d" string="Total Quantity per product"  />
                        -->

                        </child2>
                    </hpaned>
                </form>
            </field>
        </record>

        <record id="open_board_purchase" model="ir.actions.act_window">
            <field name="name">Purchase Dashboard</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="usage">menu</field>
            <field name="view_id" ref="board_purchase_form"/>
        </record>
        <menuitem
            action="open_board_purchase"
            icon="terp-graph"
            id="menu_board_purchase"
            parent="menu_purchase_deshboard"
            sequence="4"/>

        <menuitem icon="terp-purchase" id="base.menu_purchase_root" action="open_board_purchase" name="Purchases"/>


    </data>
</openerp>