1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3" groups="base.group_system,group_purchase_manager,group_purchase_user,base.group_extended"/>
5 <menuitem id="menu_procurement_management" name="Purchase Management"
6 parent="base.menu_purchase_root" sequence="1" />
8 <!--supplier addresses action-->
9 <record id="action_supplier_address_form" model="ir.actions.act_window">
10 <field name="name">Addresses</field>
11 <field name="type">ir.actions.act_window</field>
12 <field name="res_model">res.partner.address</field>
13 <field name="view_type">form</field>
14 <field name="context">{"search_default_supplier":1}</field>
15 <field name="search_view_id" ref="base.view_res_partner_address_filter"/>
17 <record id="action_supplier_address_form_view1" model="ir.actions.act_window.view">
18 <field eval="10" name="sequence"/>
19 <field name="view_mode">tree</field>
20 <field name="view_id" ref="base.view_partner_address_tree"/>
21 <field name="act_window_id" ref="action_supplier_address_form"/>
23 <record id="action_supplier_address_form_view2" model="ir.actions.act_window.view">
24 <field eval="20" name="sequence"/>
25 <field name="view_mode">form</field>
26 <field name="view_id" ref="base.view_partner_address_form1"/>
27 <field name="act_window_id" ref="action_supplier_address_form"/>
31 <menuitem id="base.menu_procurement_management_supplier" name="Address Book"
32 parent="base.menu_purchase_root" sequence="3"/>
33 <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
34 parent="base.menu_procurement_management_supplier"
35 action="base.action_partner_supplier_form" sequence="1"/>
37 <!--Inventory control-->
38 <menuitem id="menu_procurement_management_inventory" name="Inventory Control"
39 parent="base.menu_purchase_root" sequence="4"/>
40 <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
41 name="Incoming Shipments" sequence="9"/>
42 <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
43 parent="menu_procurement_management_inventory" sequence="11"/>
45 <!--Invoice control-->
46 <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
47 parent="base.menu_purchase_root" sequence="6"/>
48 <menuitem name="Supplier Invoices to Receive"
49 id="menu_procurement_management_pending_invoice"
50 action="account.action_invoice_tree_pending_invoice"
51 parent="menu_procurement_management_invoice"
55 <menuitem id="menu_procurement_management_product" name="Products"
56 parent="base.menu_purchase_root" sequence="8"/>
57 <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
58 parent="menu_procurement_management_product"/>
60 <record model="ir.ui.view" id="purchase_order_calendar">
61 <field name="name">purchase.order.calendar</field>
62 <field name="model">purchase.order</field>
63 <field name="type">calendar</field>
64 <field name="priority" eval="2"/>
65 <field name="arch" type="xml">
66 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
68 <field name="amount_total"/>
69 <field name="partner_id"/>
73 <record model="ir.ui.view" id="view_purchase_order_graph">
74 <field name="name">purchase.order.graph</field>
75 <field name="model">purchase.order</field>
76 <field name="type">graph</field>
77 <field name="arch" type="xml">
78 <graph string="Purchase Order" type="bar">
79 <field name="partner_id"/>
80 <field name="amount_total" operator="+"/>
85 <record id="purchase_order_form" model="ir.ui.view">
86 <field name="name">purchase.order.form</field>
87 <field name="model">purchase.order</field>
88 <field name="type">form</field>
89 <field name="arch" type="xml">
90 <form string="Purchase Order">
91 <group col="6" colspan="4">
93 <field name="date_order"/>
94 <field name="invoiced"/>
96 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
97 <field name="partner_ref"/>
98 <field name="shipped"/>
99 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
101 <notebook colspan="4">
102 <page string="Purchase Order">
103 <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('supplier','=', 1)]"/>
104 <field name="partner_address_id"/>
105 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
106 <field name="origin" groups="base.group_extended"/>
108 <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
109 <tree colors="red:date_planned<=current_date;black:date_planned>current_date" string="Purchase Order Lines">
110 <field name="date_planned"/>
112 <field name="product_qty"/>
113 <field name="product_uom"/>
114 <field name="price_unit"/>
115 <field name="price_subtotal"/>
117 <!-- default form view -->
119 <group col="7" colspan="4">
120 <field name="amount_untaxed" sum="Untaxed amount"/>
121 <field name="amount_tax"/>
122 <field name="amount_total" sum="Total amount"/>
123 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
125 <group col="11" colspan="4">
126 <field name="state" readonly="1"/>
127 <button name="purchase_confirm" states="draft" string="Confirm Purchase Order" icon="gtk-apply"/>
128 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
129 <button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-ok"/>
130 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order" icon="gtk-cancel"/>
131 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
132 <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
134 <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
135 <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
138 <page string="Delivery & Invoices" groups="base.group_extended">
139 <group colspan="2" col="2">
140 <separator string="Delivery" colspan="2"/>
141 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
142 <field name="minimum_planned_date"/>
143 <field name="location_id"/>
145 <group colspan="2" col="2">
146 <separator string="Invoice Control" colspan="2"/>
147 <field name="invoice_method"/>
148 <field name="invoice_id" readonly="1" groups="base.group_extended"/>
149 <field name="fiscal_position" widget="selection"/>
152 <separator string="Purchase Control" colspan="4"/>
153 <field name="validator"/>
154 <field name="date_approve"/>
156 <page string="Notes">
157 <field colspan="4" name="notes" nolabel="1"/>
164 <record id="view_purchase_order_filter" model="ir.ui.view">
165 <field name="name">purchase.order.list.select</field>
166 <field name="model">purchase.order</field>
167 <field name="type">search</field>
168 <field name="arch" type="xml">
169 <search string="Search Purchase Order">
170 <group col='10' colspan='4'>
171 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" separator="1" help="Purchase order which are in draft state"/>
172 <filter icon="terp-camera_test" name="confirmed" string="To Approve" domain="[('state','in',('wait','confirmed'))]" separator="1" help="Purchase order to be approved"/>
173 <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" separator="1" help="Approved purchase order"/>
174 <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" separator="1" help="Purchase order which are in the exception state"/>
175 <separator orientation="vertical"/>
176 <filter icon="terp-gtk-go-back-rtl" string="To Invoice" domain="[('invoiced','=',1)]" separator="1" help="Purchase order to be invoiced"/>
177 <separator orientation="vertical"/>
178 <field name="name" select="1" string="Reference"/>
179 <field name="partner_id" select="1"/>
180 <field name="product_id" select="1"/>
181 <field name="create_uid" select="1"/>
184 <group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
185 <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
186 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
187 <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
188 <separator orientation="vertical"/>
189 <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
190 <filter string="Source Document" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
195 <record id="purchase_order_tree" model="ir.ui.view">
196 <field name="name">purchase.order.tree</field>
197 <field name="model">purchase.order</field>
198 <field name="type">tree</field>
199 <field name="arch" type="xml">
200 <tree colors="grey:state in ('approved','done');blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
201 <field name="name" string="Reference"/>
202 <field name="date_order" string="Order Date"/>
203 <field name="partner_id"/>
204 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
205 <field name="location_id"/>
206 <field name="minimum_planned_date"/>
207 <field name="origin"/>
208 <field name="invoiced_rate" widget="progressbar"/>
209 <field name="shipped_rate" widget="progressbar"/>
210 <field name="amount_untaxed" sum="Total Untaxed amount"/>
211 <field name="amount_total" sum="Total amount"/>
212 <field name="state"/>
217 <record id="purchase_rfq" model="ir.actions.act_window">
218 <field name="name">Requests for Quotation</field>
219 <field name="type">ir.actions.act_window</field>
220 <field name="res_model">purchase.order</field>
221 <field name="view_type">form</field>
222 <field name="context">{'search_default_draft': 1,'search_default_create_uid':uid}</field>
223 <field name="view_mode">tree,form,graph,calendar</field>
224 <field name="search_view_id" ref="view_purchase_order_filter"/>
225 <field name="help">With the Requests for quotation menu you can create new quotations, review existing one and confirm them to order once the supplier offer is approved.</field>
227 <menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
228 sequence="6" groups="group_purchase_manager,group_purchase_user"/>
230 <record id="purchase_form_action" model="ir.actions.act_window">
231 <field name="name">Purchase Orders</field>
232 <field name="type">ir.actions.act_window</field>
233 <field name="res_model">purchase.order</field>
234 <field name="view_mode">tree,form,graph,calendar</field>
235 <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
236 <field name="search_view_id" ref="view_purchase_order_filter"/>
237 <field name="help">From the Purchase Orders menu, you can create directly new orders and consult the list of your orders in their various state.</field>
239 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" />
242 <record id="purchase_order_line_form" model="ir.ui.view">
243 <field name="name">purchase.order.line.form</field>
244 <field name="model">purchase.order.line</field>
245 <field name="type">form</field>
246 <field name="arch" type="xml">
247 <form string="Purchase Order Line">
248 <notebook colspan="4">
249 <page string="Order Line">
250 <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,date_planned,name,price_unit,notes)"/>
251 <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,date_planned,name,price_unit,notes)"/>
252 <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position)"/>
253 <field colspan="4" name="name"/>
254 <field name="date_planned" widget="date"/>
255 <field name="price_unit"/>
256 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
257 <field name="account_analytic_id" colspan="4" groups="base.group_extended" domain="[('parent_id','!=',False)]" />
258 <group colspan="4" col="4" groups="base.group_extended">
259 <separator colspan="4" string="Taxes"/>
260 <field colspan="4" nolabel="1" name="taxes_id"
261 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
264 <page string="Notes">
265 <field colspan="4" name="notes" nolabel="1"/>
267 <page string="History" groups="base.group_extended">
268 <separator colspan="4" string="Stock Moves"/>
269 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
271 <page string="Invoicing" groups="base.group_extended">
272 <separator colspan="4" string="Manual Invoices"/>
273 <field name="invoiced"/>
275 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
282 <record id="purchase_order_line_tree" model="ir.ui.view">
283 <field name="name">purchase.order.line.tree</field>
284 <field name="model">purchase.order.line</field>
285 <field name="type">tree</field>
286 <field name="arch" type="xml">
287 <tree colors="red:date_planned<=current_date;black:date_planned>current_date" string="Purchase Order Lines">
288 <field name="order_id"/>
290 <field name="date_planned" widget="date" width="135"/>
291 <field name="product_id"/>
292 <field name="product_qty"/>
293 <field name="product_uom"/>
294 <field name="price_unit"/>
295 <field name="price_subtotal"/>
296 <field name="invoiced"/>
300 <record id="purchase_order_line_form2" model="ir.ui.view">
301 <field name="name">purchase.order.line.form2</field>
302 <field name="model">purchase.order.line</field>
303 <field name="type">form</field>
304 <field name="arch" type="xml">
305 <form string="Purchase Order Line">
306 <notebook colspan="4">
307 <page string="Order Line">
308 <separator colspan="4" string="General Information"/>
309 <field name="order_id"/>
310 <field name="product_id" readonly="1" />
311 <field name="product_qty" readonly="1" />
312 <field name="product_uom" readonly="1"/>
313 <field colspan="4" name="name"/>
314 <field name="date_planned" widget="date" readonly="1"/>
315 <field name="price_unit"/>
316 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
317 <field name="account_analytic_id" colspan="4" groups="base.group_extended" domain="[('parent_id','!=',False)]"/>
318 <group colspan="4" col="4" groups="base.group_extended">
319 <separator colspan="4" string="Taxes"/>
320 <field colspan="4" nolabel="1" name="taxes_id"
321 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
324 <page string="Notes">
325 <field colspan="4" name="notes" nolabel="1"/>
327 <page string="History" groups="base.group_extended">
328 <separator colspan="4" string="Stock Moves"/>
329 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
331 <page string="Invoicing" groups="base.group_extended">
332 <separator colspan="4" string="Manual Invoices"/>
333 <field name="invoiced"/>
335 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
341 <record id="purchase_order_line_search" model="ir.ui.view">
342 <field name="name">purchase.order.line.search</field>
343 <field name="model">purchase.order.line</field>
344 <field name="type">search</field>
345 <field name="arch" type="xml">
346 <search string="Search Purchase Order">
348 <field name="order_id"/>
349 <field name="product_id"/>
352 <group expand="0" string="Group By...">
353 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
354 <filter string="Product" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by' : 'product_id'}" />
355 <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
362 context="{'partner_id': active_id}"
363 domain="[('partner_id', '=', active_id)]"
364 id="act_res_partner_2_purchase_order"
365 name="Purchase orders"
366 res_model="purchase.order"
367 src_model="res.partner"/>
370 domain="[('product_id','=',active_id)]"
371 id="action_purchase_line_product_tree"
372 name="Product purchases"
373 res_model="purchase.order.line"
374 src_model="product.product"
375 groups="base.group_extended"/>
378 <record id="purchase_line_form_action2" model="ir.actions.act_window">
379 <field name="name">Purchase Lines not Invoiced</field>
380 <field name="type">ir.actions.act_window</field>
381 <field name="res_model">purchase.order.line</field>
382 <field name="domain">[('state','in',('confirmed','done')), ('invoiced','=',False)]</field>
383 <field name="view_type">form</field>
384 <field name="view_mode">tree,form</field>
385 <field name="search_view_id" ref="purchase_order_line_search"/>
387 <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
388 <field eval="1" name="sequence"/>
389 <field name="view_mode">tree</field>
390 <field name="view_id" ref="purchase_order_line_tree"/>
391 <field name="act_window_id" ref="purchase_line_form_action2"/>
393 <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
394 <field eval="2" name="sequence"/>
395 <field name="view_mode">form</field>
396 <field name="view_id" ref="purchase_order_line_form2"/>
397 <field name="act_window_id" ref="purchase_line_form_action2"/>
400 action="purchase_line_form_action2"
401 id="menu_purchase_line_order_draft"
402 groups="base.group_extended"
403 parent="menu_procurement_management_invoice"
410 <record id="view_procurement_form_inherit" model="ir.ui.view">
411 <field name="name">procurement.order.form.inherit</field>
412 <field name="model">procurement.order</field>
413 <field name="inherit_id" ref="procurement.procurement_form_view"/>
414 <field name="type">form</field>
415 <field name="arch" type="xml">
416 <xpath expr="/form/notebook/page/field[@name='close_move']" position="before">
417 <field name="purchase_id"/>