~almacom/openobject-addons/ac_addons

« back to all changes in this revision

Viewing changes to purchase/purchase_view.xml

  • Committer: David Janssens
  • Date: 2009-05-15 10:50:47 UTC
  • Revision ID: david.j@almacom.co.th-20090515105047-3fefsk2io2bloi0f
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
    <data>
 
4
        <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"
 
5
            groups="group_purchase_user"/>
 
6
 
 
7
       <record model="ir.ui.view" id="purchase_order_calendar">
 
8
            <field name="name">purchase.order.calendar</field>
 
9
            <field name="model">purchase.order</field>
 
10
            <field name="type">calendar</field>
 
11
            <field name="priority" eval="2"/>
 
12
            <field name="arch" type="xml">
 
13
                <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
 
14
                    <field name="name"/>
 
15
                    <field name="amount_total"/>
 
16
                    <field name="partner_id"/>
 
17
                </calendar>
 
18
            </field>
 
19
        </record>
 
20
        <record model="ir.ui.view" id="view_purchase_order_graph">
 
21
            <field name="name">purchase.order.graph</field>
 
22
            <field name="model">purchase.order</field>
 
23
            <field name="type">graph</field>
 
24
            <field name="arch" type="xml">
 
25
                <graph string="Purchase Order" type="bar">
 
26
                    <field name="partner_id"/>
 
27
                    <field name="amount_total" operator="+"/>
 
28
                </graph>
 
29
            </field>
 
30
        </record>
 
31
 
 
32
        <record id="purchase_order_form" model="ir.ui.view">
 
33
            <field name="name">purchase.order.form</field>
 
34
            <field name="model">purchase.order</field>
 
35
            <field name="type">form</field>
 
36
            <field name="arch" type="xml">
 
37
                <form string="Purchase Order">
 
38
                    <group col="6" colspan="4">
 
39
                        <field name="name" select="1"/>
 
40
                        <field name="date_order" select="2"/>
 
41
                        <field name="invoiced" select="2"/>
 
42
                        <newline/>
 
43
                        <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
 
44
                        <field name="origin" select="2"/>
 
45
                        <field name="shipped" select="2"/>
 
46
                    </group>
 
47
                    <notebook colspan="4">
 
48
                        <page string="Purchase Order">
 
49
                            <field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
 
50
                            <field name="partner_address_id"/>
 
51
                            <field domain="[('type','=','purchase')]" name="pricelist_id"/>
 
52
                            <field name="partner_ref" select="2"/>
 
53
                            <newline/>
 
54
                            <field colspan="4" name="order_line" nolabel="1"/>
 
55
                            <group col="7" colspan="4">
 
56
                                <field name="amount_untaxed" sum="Untaxed amount"/>
 
57
                                <field name="amount_tax"/>
 
58
                                <field name="amount_total" sum="Total amount"/>
 
59
                                <button name="button_dummy" states="draft" string="Compute" type="object"/>
 
60
                            </group>
 
61
                            <group col="11" colspan="4">
 
62
                                <field name="state" readonly="1"/>
 
63
                                <button name="purchase_confirm" states="draft" string="Confirm Purchase Order" icon="gtk-execute"/>
 
64
                                <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
 
65
                                <button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-ok"/>
 
66
                                <field name="show_service_button" invisible="1"/>
 
67
                                <button name="service_done" string="Services Delivered" icon="gtk-ok" attrs="{'invisible':[('show_service_button','!=',True)]}"/>
 
68
                                <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order" icon="gtk-cancel"/>
 
69
                                <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
 
70
                                <button name="action_cancel" states="approved,except_picking,except_service,except_invoice" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
 
71
 
 
72
                                <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
 
73
                                <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
 
74
                            </group>
 
75
                        </page>
 
76
                        <page string="Delivery &amp; Invoices">
 
77
                            <group colspan="2" col="2">
 
78
                                <separator string="Delivery" colspan="2"/>
 
79
                                <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
 
80
                                <field name="minimum_planned_date"/>
 
81
                                <field name="location_id"/>
 
82
                            </group>
 
83
                            <group colspan="2" col="2">
 
84
                                <separator string="Invoice Control" colspan="2"/>
 
85
                                <field name="invoice_method"/>
 
86
                                <field name="invoice_id" readonly="1"/>
 
87
                                <field name="fiscal_position" groups="base.group_extended"/>
 
88
                            </group>
 
89
                            <newline/>
 
90
                            <separator string="Purchase Control" colspan="4"/>
 
91
                            <field name="validator"/>
 
92
                            <field name="date_approve"/>
 
93
                        </page>
 
94
                        <page string="Notes">
 
95
                            <field colspan="4" name="notes" nolabel="1"/>
 
96
                        </page>
 
97
                    </notebook>
 
98
                </form>
 
99
            </field>
 
100
        </record>
 
101
 
 
102
        <record id="purchase_form_action" model="ir.actions.act_window">
 
103
            <field name="name">Purchase Orders</field>
 
104
            <field name="type">ir.actions.act_window</field>
 
105
            <field name="res_model">purchase.order</field>
 
106
            <field name="view_mode">tree,form,calendar,graph</field>
 
107
        </record>
 
108
        <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="purchase.menu_purchase_root"/>
 
109
 
 
110
        <record id="purchase_form_action2" model="ir.actions.act_window">
 
111
            <field name="name">Request For Quotations</field>
 
112
            <field name="type">ir.actions.act_window</field>
 
113
            <field name="res_model">purchase.order</field>
 
114
            <field name="domain">[('state','=','draft')]</field>
 
115
            <field name="view_type">form</field>
 
116
            <field name="view_mode">tree,form,calendar,graph</field>
 
117
        </record>
 
118
        <menuitem action="purchase_form_action2" id="menu_purchase_order_draft" parent="purchase.menu_purchase_form_action"/>
 
119
 
 
120
        <record id="purchase_form_action3" model="ir.actions.act_window">
 
121
            <field name="name">Purchase Order Waiting Approval</field>
 
122
            <field name="type">ir.actions.act_window</field>
 
123
            <field name="res_model">purchase.order</field>
 
124
            <field name="view_type">form</field>
 
125
            <field name="view_mode">tree,form,calendar,graph</field>
 
126
            <field name="domain">[('state','=','confirmed')]</field>
 
127
        </record>
 
128
        <menuitem action="purchase_form_action3" id="menu_purchase_form_action3" parent="purchase.menu_purchase_form_action"/>
 
129
 
 
130
        <record id="purchase_form_action4" model="ir.actions.act_window">
 
131
            <field name="name">Purchase Orders in Progress</field>
 
132
            <field name="type">ir.actions.act_window</field>
 
133
            <field name="res_model">purchase.order</field>
 
134
            <field name="view_type">form</field>
 
135
            <field name="view_mode">tree,form,calendar,graph</field>
 
136
            <field name="domain">[('state','=','approved')]</field>
 
137
        </record>
 
138
        <menuitem action="purchase_form_action4" id="menu_purchase_form_action4" parent="purchase.menu_purchase_form_action"/>
 
139
 
 
140
        <record id="purchase_form_action_new" model="ir.actions.act_window">
 
141
            <field name="name">New Purchase Order</field>
 
142
            <field name="type">ir.actions.act_window</field>
 
143
            <field name="res_model">purchase.order</field>
 
144
            <field name="view_mode">form,tree</field>
 
145
        </record>
 
146
        <menuitem action="purchase_form_action_new" id="menu_purchase_form_action_new" parent="purchase.menu_purchase_root"/>
 
147
 
 
148
 
 
149
        <record id="purchase_order_tree" model="ir.ui.view">
 
150
            <field name="name">purchase.order.tree</field>
 
151
            <field name="model">purchase.order</field>
 
152
            <field name="type">tree</field>
 
153
            <field name="arch" type="xml">
 
154
                <tree string="Purchase Order">
 
155
                    <field name="name" string="Reference"/>
 
156
                    <field name="date_order"/>
 
157
                    <field name="minimum_planned_date"/>
 
158
                    <field name="partner_id"/>
 
159
                    <field name="location_id"/>
 
160
                    <field name="invoiced_rate" widget="progressbar"/>
 
161
                    <field name="shipped_rate" widget="progressbar"/>
 
162
                    <field name="amount_untaxed"/>
 
163
                    <field name="origin"/>
 
164
                    <field name="state"/>
 
165
                </tree>
 
166
            </field>
 
167
        </record>
 
168
 
 
169
        <record id="purchase_order_line_form" model="ir.ui.view">
 
170
            <field name="name">purchase.order.line.form</field>
 
171
            <field name="model">purchase.order.line</field>
 
172
            <field name="type">form</field>
 
173
            <field name="arch" type="xml">
 
174
                <form string="Purchase Order Line">
 
175
                    <notebook>
 
176
                        <page string="Order Line">
 
177
                            <field colspan="4" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order, parent.fiscal_position)"/>
 
178
                            <field context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_qty" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order, parent.fiscal_position)"/>
 
179
                            <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
 
180
                            <field colspan="4" name="name"/>
 
181
                            <field name="date_planned"/>
 
182
                            <field name="price_unit"/>
 
183
                            <field name="account_analytic_id"/>
 
184
                            <field name="price_subtotal" readonly="1"/>
 
185
                            <field colspan="4" name="taxes_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','sale')]"/>
 
186
                        </page>
 
187
                        <page string="Notes">
 
188
                            <field colspan="4" name="notes" nolabel="1"/>
 
189
                        </page>
 
190
                    </notebook>
 
191
                </form>
 
192
            </field>
 
193
        </record>
 
194
 
 
195
        <record id="purchase_order_line_tree" model="ir.ui.view">
 
196
            <field name="name">purchase.order.line.tree</field>
 
197
            <field name="model">purchase.order.line</field>
 
198
            <field name="type">tree</field>
 
199
            <field name="arch" type="xml">
 
200
                <tree colors="red:date_planned&lt;=current_date" string="Purchase Order Line">
 
201
                    <field name="date_planned"/>
 
202
                    <field name="name"/>
 
203
                    <field name="product_qty"/>
 
204
                    <field name="product_uom"/>
 
205
                    <field name="price_unit"/>
 
206
                    <field name="price_subtotal"/>
 
207
                </tree>
 
208
            </field>
 
209
        </record>
 
210
 
 
211
        <act_window
 
212
            context="{'partner_id': active_id}"
 
213
            domain="[('partner_id', '=', active_id)]"
 
214
            id="act_res_partner_2_purchase_order"
 
215
            name="Purchase orders"
 
216
            res_model="purchase.order"
 
217
            src_model="res.partner"/>
 
218
    </data>
 
219
</openerp>