1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"
5 groups="group_purchase_user"/>
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">
15 <field name="amount_total"/>
16 <field name="partner_id"/>
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="+"/>
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"/>
43 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
44 <field name="origin" select="2"/>
45 <field name="shipped" select="2"/>
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"/>
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"/>
61 <group col="11" colspan="4">
62 <field name="state" readonly="1"/>
63 <button name="purchase_confirm" states="draft" string="Confirm Purchase Order"/>
64 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
65 <button name="purchase_approve" states="confirmed" string="Approved by Supplier"/>
66 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order"/>
67 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
68 <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel Purchase Order" type="object"/>
70 <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
71 <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
74 <page string="Delivery & Invoices">
75 <group colspan="2" col="2">
76 <separator string="Delivery" colspan="2"/>
77 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
78 <field name="minimum_planned_date"/>
79 <field name="location_id"/>
81 <group colspan="2" col="2">
82 <separator string="Invoice Control" colspan="2"/>
83 <field name="invoice_method"/>
84 <field name="invoice_id" readonly="1"/>
87 <separator string="Purchase Control" colspan="4"/>
88 <field name="validator"/>
89 <field name="date_approve"/>
92 <field colspan="4" name="notes" nolabel="1"/>
99 <record id="purchase_form_action" model="ir.actions.act_window">
100 <field name="name">Purchase Orders</field>
101 <field name="type">ir.actions.act_window</field>
102 <field name="res_model">purchase.order</field>
103 <field name="view_mode">tree,form,calendar,graph</field>
105 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="purchase.menu_purchase_root"/>
107 <record id="purchase_form_action2" model="ir.actions.act_window">
108 <field name="name">Request For Quotations</field>
109 <field name="type">ir.actions.act_window</field>
110 <field name="res_model">purchase.order</field>
111 <field name="domain">[('state','=','draft')]</field>
112 <field name="view_type">form</field>
113 <field name="view_mode">tree,form,calendar,graph</field>
115 <menuitem action="purchase_form_action2" id="menu_purchase_order_draft" parent="purchase.menu_purchase_form_action"/>
117 <record id="purchase_form_action3" model="ir.actions.act_window">
118 <field name="name">Purchase Order Waiting Approval</field>
119 <field name="type">ir.actions.act_window</field>
120 <field name="res_model">purchase.order</field>
121 <field name="view_type">form</field>
122 <field name="view_mode">tree,form,calendar,graph</field>
123 <field name="domain">[('state','=','confirmed')]</field>
125 <menuitem action="purchase_form_action3" id="menu_purchase_form_action3" parent="purchase.menu_purchase_form_action"/>
127 <record id="purchase_form_action4" model="ir.actions.act_window">
128 <field name="name">Purchase Orders in Progress</field>
129 <field name="type">ir.actions.act_window</field>
130 <field name="res_model">purchase.order</field>
131 <field name="view_type">form</field>
132 <field name="view_mode">tree,form,calendar,graph</field>
133 <field name="domain">[('state','=','approved')]</field>
135 <menuitem action="purchase_form_action4" id="menu_purchase_form_action4" parent="purchase.menu_purchase_form_action"/>
137 <record id="purchase_form_action_new" model="ir.actions.act_window">
138 <field name="name">New Purchase Order</field>
139 <field name="type">ir.actions.act_window</field>
140 <field name="res_model">purchase.order</field>
141 <field name="view_mode">form,tree</field>
143 <menuitem action="purchase_form_action_new" id="menu_purchase_form_action_new" parent="purchase.menu_purchase_root"/>
146 <record id="purchase_order_tree" model="ir.ui.view">
147 <field name="name">purchase.order.tree</field>
148 <field name="model">purchase.order</field>
149 <field name="type">tree</field>
150 <field name="arch" type="xml">
151 <tree string="Purchase Order">
152 <field name="name" string="Reference"/>
153 <field name="date_order"/>
154 <field name="minimum_planned_date"/>
155 <field name="partner_id"/>
156 <field name="location_id"/>
157 <field name="invoiced_rate" widget="progressbar"/>
158 <field name="shipped_rate" widget="progressbar"/>
159 <field name="amount_untaxed"/>
160 <field name="origin"/>
161 <field name="state"/>
166 <record id="purchase_order_line_form" model="ir.ui.view">
167 <field name="name">purchase.order.line.form</field>
168 <field name="model">purchase.order.line</field>
169 <field name="type">form</field>
170 <field name="arch" type="xml">
171 <form string="Purchase Order Line">
173 <page string="Order Line">
174 <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)"/>
175 <field name="product_qty"/>
176 <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
177 <field colspan="4" name="name"/>
178 <field name="date_planned"/>
179 <field name="price_unit"/>
180 <field name="account_analytic_id"/>
181 <field name="price_subtotal" readonly="1"/>
182 <field colspan="4" name="taxes_id" domain="[('parent_id','=',False)]"/>
184 <page string="Notes">
185 <field colspan="4" name="notes" nolabel="1"/>
192 <record id="purchase_order_line_tree" model="ir.ui.view">
193 <field name="name">purchase.order.line.tree</field>
194 <field name="model">purchase.order.line</field>
195 <field name="type">tree</field>
196 <field name="arch" type="xml">
197 <tree colors="red:date_planned<=current_date" string="Purchase Order Line">
198 <field name="date_planned"/>
200 <field name="product_qty"/>
201 <field name="product_uom"/>
202 <field name="price_unit"/>
203 <field name="price_subtotal"/>
209 context="{'partner_id': active_id}"
210 domain="[('partner_id', '=', active_id)]"
211 id="act_res_partner_2_purchase_order"
212 name="Purchase orders"
213 res_model="purchase.order"
214 src_model="res.partner"/>