5
<menuitem name="Purchase Management" id="menu_purchase_root" icon="terp-purchase"/>
7
<record model="ir.ui.view" id="purchase_order_form">
8
<field name="name">purchase.order.form</field>
9
<field name="model">purchase.order</field>
10
<field name="type">form</field>
11
<field name="arch" type="xml">
12
<form string="Purchase Order">
14
<page string="Purchase Order">
15
<field name="name" select="1"/>
16
<group colspan="2" col="4">
17
<field name="shipped" select="1"/>
18
<field name="invoiced" select="1"/>
21
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
22
<field name="date_order" select="1"/>
23
<field name="partner_id" select="1" on_change="onchange_partner_id(partner_id)"/>
24
<field name="partner_address_id"/>
25
<field name="pricelist_id" domain="[('type','=','sale')]"/>
26
<field name="project_id" select="1"/>
27
<field name="ref" select="1"/>
28
<field name="partner_ref" select="1"/>
30
<field name="order_line" widget="one2many_list" colspan="4" nolabel="1"/>
31
<separator string="Document State" colspan="4" select="1"/>
32
<group colspan="4" col="7">
33
<field name="amount_untaxed"/>
34
<field name="amount_tax"/>
35
<field name="amount_total"/>
36
<button name="button_dummy" string="Compute" states="draft" type="object"/>
38
<group col="9" colspan="4">
39
<field name="state" readonly="1"/>
40
<button name="purchase_confirm" states="draft" string="Confirm Purchase Order"/>
41
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
42
<button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
43
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
45
<button name="purchase_cancel" states="approved" string="Cancel Purchase Order"/>
47
<button name="shipping_ok" states="except_shipping" string="Shipping Done"/>
48
<button name="invoice_ok" states="except_invoice" string="Invoice Done"/>
51
<page string="Purchase Shippings">
52
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
53
<field name="location_id"/>
54
<field name="invoice_method"/>
56
<field name="picking_id" colspan="3"/>
57
<field name="invoice_id" colspan="3"/>
60
<field name="validator" />
61
<field name="date_approve" />
62
<field name="origin" select="1"/>
63
<field name="notes" colspan="4" nolabel="1"/>
70
<record model="ir.actions.act_window" id="purchase_form_action">
71
<field name="name">purchase.order.form</field>
72
<field name="type">ir.actions.act_window</field>
73
<field name="res_model">purchase.order</field>
74
<field name="view_mode">form,tree</field>
76
<menuitem name="Purchase Management/Purchase Order" id="menu_purchase_form_action" action="purchase_form_action"/>
77
<record model="ir.actions.act_window" id="purchase_form_action2">
78
<field name="name">purchase.order.form</field>
79
<field name="type">ir.actions.act_window</field>
80
<field name="res_model">purchase.order</field>
81
<field name="domain">[('state','=','draft')]</field>
82
<field name="view_type">form</field>
83
<field name="view_mode">tree,form</field>
85
<menuitem name="Purchase Management/Purchase Order/Draft Purchase Order (RFQ)" action="purchase_form_action2" id="menu_purchase_order_draft"/>
86
<record model="ir.actions.act_window" id="purchase_form_action3">
87
<field name="name">purchase.order.form</field>
88
<field name="type">ir.actions.act_window</field>
89
<field name="res_model">purchase.order</field>
90
<field name="view_type">form</field>
91
<field name="view_mode">tree,form</field>
92
<field name="domain">[('state','=','confirmed')]</field>
94
<menuitem name="Purchase Management/Purchase Order/Purchase Order waiting Approval" id="menu_purchase_form_action3" action="purchase_form_action3"/>
95
<record model="ir.actions.act_window" id="purchase_form_action4">
96
<field name="name">purchase.order.form</field>
97
<field name="type">ir.actions.act_window</field>
98
<field name="res_model">purchase.order</field>
99
<field name="view_type">form</field>
100
<field name="view_mode">tree,form</field>
101
<field name="domain">[('state','=','approved')]</field>
103
<menuitem name="Purchase Management/Purchase Order/Running Purchase Order" id="menu_purchase_form_action4" action="purchase_form_action4"/>
105
<record model="ir.ui.view" id="purchase_order_tree">
106
<field name="name">purchase.order.tree</field>
107
<field name="model">purchase.order</field>
108
<field name="type">tree</field>
109
<field name="arch" type="xml">
110
<tree string="Purchase Order">
112
<field name="date_order"/>
113
<field name="partner_id"/>
114
<field name="location_id"/>
115
<field name="origin"/>
116
<field name="invoiced" string="Paid"/>
117
<field name="shipped"/>
118
<field name="amount_untaxed"/>
119
<field name="state"/>
124
<record model="ir.ui.view" id="purchase_order_line_form">
125
<field name="name">purchase.order.line.form</field>
126
<field name="model">purchase.order.line</field>
127
<field name="type">form</field>
128
<field name="arch" type="xml">
129
<form string="Purchase Order Line">
131
<page string="Order Line">
132
<field name="product_qty"/>
133
<field name="product_uom"/>
134
<field name="product_id" colspan="3" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id)" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"/>
135
<field name="name" colspan="3"/>
136
<field name="date_planned"/>
137
<field name="price_unit"/>
138
<field name="price_subtotal" readonly="1" />
139
<field name="taxes_id" colspan="3"/>
140
</page><page string="Notes">
141
<field name="notes" colspan="3" nolabel="1"/>
148
<record model="ir.ui.view" id="purchase_order_line_tree">
149
<field name="name">purchase.order.line.tree</field>
150
<field name="model">purchase.order.line</field>
151
<field name="type">tree</field>
152
<field name="arch" type="xml">
153
<tree string="Purchase Order Line" colors="red:date_planned<=current_date">
154
<field name="date_planned"/>
156
<field name="product_id"/>
157
<field name="product_qty"/>
158
<field name="product_uom"/>
159
<field name="price_unit"/>
160
<field name="price_subtotal"/>