1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3"
5 groups="group_purchase_manager,group_purchase_user"
6 web_icon="images/purchases.png"
7 web_icon_hover="images/purchases-hover.png"/>
8 <menuitem id="menu_procurement_management" name="Purchase"
9 parent="base.menu_purchase_root" sequence="1" />
11 <menuitem id="menu_purchase_config_purchase" name="Configuration"
12 groups="group_purchase_manager"
13 parent="base.menu_purchase_root" sequence="100"/>
16 id="menu_purchase_config_pricelist" name="Pricelists"
17 parent="menu_purchase_config_purchase" sequence="50" groups="product.group_purchase_pricelist"/>
20 action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
21 parent="menu_purchase_config_pricelist" sequence="20" groups="base.group_no_one"/>
24 action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
25 parent="menu_purchase_config_pricelist" sequence="10" />
28 id="menu_product_in_config_purchase" name="Products"
29 parent="menu_purchase_config_purchase" sequence="30" groups="base.group_no_one"/>
32 action="product.product_category_action_form" id="menu_product_category_config_purchase"
33 parent="purchase.menu_product_in_config_purchase" sequence="1" />
36 id="menu_purchase_unit_measure_purchase" name="Units of Measure"
37 parent="purchase.menu_product_in_config_purchase" sequence="20" groups="product.group_uom"/>
40 action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
41 parent="purchase.menu_product_in_config_purchase" sequence="5" />
44 action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
45 parent="purchase.menu_product_in_config_purchase" sequence="10"/>
48 id="menu_purchase_partner_cat" name="Address Book"
49 parent="menu_purchase_config_purchase"/>
52 action="base.action_partner_category_form" id="menu_partner_categories_in_form" name="Partner Categories"
53 parent="purchase.menu_purchase_partner_cat" groups="base.group_no_one"/>
56 <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
57 parent="menu_procurement_management"
58 action="base.action_partner_supplier_form" sequence="15"/>
60 <!--Inventory control-->
61 <menuitem id="menu_procurement_management_inventory" name="Receive Products"
62 parent="base.menu_purchase_root" sequence="4"/>
63 <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
64 name="Incoming Shipments" sequence="9"/>
65 <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
66 parent="menu_procurement_management_inventory" sequence="11"/>
68 <!--Invoice control-->
69 <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
70 parent="base.menu_purchase_root" sequence="6"/>
72 <record id="action_invoice_pending" model="ir.actions.act_window">
73 <field name="name">Based on Draft Invoices</field>
74 <field name="res_model">account.invoice</field>
75 <field name="view_type">form</field>
76 <field name="view_mode">tree,form,calendar,graph</field>
77 <field eval="False" name="view_id"/>
78 <field name="domain">[('type','=','in_invoice')]</field>
79 <field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
80 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
82 Use this menu to control the invoices to be received from your supplier.
83 OpenERP generates draft invoices from your purchase orders or receptions, according to your settings.
84 Once you receive a supplier invoice, you can match it with the draft invoice and validate it.
88 <menuitem name="Based on Draft Invoices"
89 id="menu_procurement_management_pending_invoice"
90 action="action_invoice_pending"
91 parent="menu_procurement_management_invoice"
95 <menuitem id="menu_procurement_management_product" name="Products"
96 parent="base.menu_purchase_root" sequence="8"/>
98 <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
99 parent="menu_procurement_management_product" sequence="10"/>
101 <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
102 parent="menu_procurement_management_product"/>
104 <record model="ir.ui.view" id="purchase_order_calendar">
105 <field name="name">purchase.order.calendar</field>
106 <field name="model">purchase.order</field>
107 <field name="type">calendar</field>
108 <field name="priority" eval="2"/>
109 <field name="arch" type="xml">
110 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
112 <field name="amount_total"/>
113 <field name="partner_id"/>
117 <record model="ir.ui.view" id="purchase_order_graph">
118 <field name="name">purchase.order.graph</field>
119 <field name="model">purchase.order</field>
120 <field name="type">graph</field>
121 <field name="arch" type="xml">
122 <graph string="Purchase Order" type="bar">
123 <field name="partner_id"/>
124 <field name="amount_total" operator="+"/>
129 <record id="purchase_order_form" model="ir.ui.view">
130 <field name="name">purchase.order.form</field>
131 <field name="model">purchase.order</field>
132 <field name="type">form</field>
133 <field name="arch" type="xml">
134 <form string="Purchase Order" version="7.0">
136 <button name="purchase_confirm" states="draft,sent" string="Confirm Order" class="oe_highlight"/>
137 <button name="wkf_send_rfq" states="draft" string="Send RFQ" type="object" context="{'send_rfq':True}"/>
138 <button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object"/>
139 <button name="action_cancel" states="except_picking,except_invoice,wait" string="Cancel" type="object" />
140 <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
141 <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
142 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" class="oe_highlight"/>
143 <button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight"/>
144 <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}"/>
145 <button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}"/>
146 <button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object"/>
147 <button name="purchase_cancel" states="draft,confirmed,wait_auth,sent" string="Cancel"/>
148 <field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
151 <div class="oe_title">
153 <label string="Draft Purchase Order " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
154 <label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
155 <field name="name" class="oe_inline" readonly="1"/>
160 <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}" options='{"quick_create": false}'/>
161 <field name="partner_ref"/>
162 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist"/>
165 <field name="date_order"/>
166 <field name="origin" attr="{'invisible': [('origin','=',False)]}"/>
167 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
168 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
172 <page string="Purchase Order">
173 <field name="order_line">
174 <tree string="Purchase Order Lines">
175 <field name="date_planned"/>
177 <field name="product_qty"/>
178 <field name="product_uom" groups="product.group_uom"/>
179 <field name="price_unit"/>
180 <field name="price_subtotal"/>
183 <group class="oe_subtotal_footer oe_right">
184 <field name="amount_untaxed"/>
185 <field name="amount_tax"/>
186 <div class="oe_subtotal_footer_separator oe_inline" colspan="2">
187 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute" class="oe_inline oe_left"/>
188 <field name="amount_total"/>
192 <div class="oe_clear"/>
194 <field name="notes"/>
196 <page string="Delivery & Invoicing">
199 <field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)"/>
200 <field name="minimum_planned_date"/>
201 <field name="location_id" groups="stock.group_locations"/>
202 <field name="shipped" groups="base.group_no_one"/>
205 <field name="validator" groups="base.group_no_one"/>
206 <field name="date_approve"/>
209 <group string="Invoicing">
211 <field name="invoice_method"/>
212 <field name="invoiced"/>
215 <field name="fiscal_position"/>
218 <separator string="Invoices"/>
219 <field name="invoice_ids" context="{'type':'in_invoice', 'journal_type':'purchase'}"/>
224 <field name="message_ids" widget="ThreadView"/>
230 <record id="view_request_for_quotation_filter" model="ir.ui.view">
231 <field name="name">request.quotation.select</field>
232 <field name="model">purchase.order</field>
233 <field name="type">search</field>
234 <field name="arch" type="xml">
235 <search string="Search Purchase Order">
237 <field name="name" string="Reference"/>
238 <separator orientation="vertical"/>
239 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase order which are in draft state"/>
240 <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" help="Approved purchase order"/>
241 <filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]" help="Purchase orders that include lines not invoiced."/>
242 <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase order which are in the exception state"/>
243 <separator orientation="vertical"/>
244 <field name="partner_id"/>
245 <field name="product_id"/>
246 <field name="create_uid"/>
249 <group expand="0" string="Group By...">
250 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
251 <separator orientation="vertical"/>
252 <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
253 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
254 <separator orientation="vertical"/>
255 <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
256 <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
262 <record id="view_purchase_order_filter" model="ir.ui.view">
263 <field name="name">purchase.order.list.select</field>
264 <field name="model">purchase.order</field>
265 <field name="type">search</field>
266 <field name="arch" type="xml">
267 <search string="Search Purchase Order">
269 <field name="name" string="Reference"/>
270 <separator orientation="vertical"/>
271 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase orders which are in draft state"/>
272 <filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]" help="Approved purchase orders"/>
273 <filter icon="terp-gtk-go-back-rtl" name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]" help="Purchase orders that include lines not invoiced."/>
274 <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
275 <separator orientation="vertical"/>
276 <field name="partner_id"/>
277 <field name="product_id"/>
278 <field name="create_uid"/>
281 <group expand="0" string="Group By...">
282 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
283 <separator orientation="vertical"/>
284 <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
285 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
286 <separator orientation="vertical"/>
287 <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
288 <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
294 <record id="purchase_order_tree" model="ir.ui.view">
295 <field name="name">purchase.order.tree</field>
296 <field name="model">purchase.order</field>
297 <field name="type">tree</field>
298 <field name="arch" type="xml">
299 <tree fonts="bold:needaction_pending==True" colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
300 <field name="needaction_pending" invisible="1"/>
301 <field name="name" string="Reference"/>
302 <field name="date_order" />
303 <field name="partner_id"/>
304 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
305 <field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
306 <field name="origin"/>
307 <field name="invoiced_rate" widget="progressbar" invisible="context.get('quotation_only', False)"/>
308 <field name="shipped_rate" widget="progressbar" invisible="context.get('quotation_only', False)"/>
309 <field name="amount_untaxed" sum="Total Untaxed amount"/>
310 <field name="amount_total" sum="Total amount"/>
311 <field name="state"/>
316 <record id="purchase_rfq" model="ir.actions.act_window">
317 <field name="name">Quotations</field>
318 <field name="type">ir.actions.act_window</field>
319 <field name="res_model">purchase.order</field>
320 <field name="context">{'search_default_draft': 1}</field>
321 <field name="view_mode">tree,form,graph,calendar</field>
322 <field name="search_view_id" ref="view_purchase_order_filter"/>
324 Create a request for quotation when you want to buy products from a supplier.
325 You can also use this menu to review requests for quotation created automatically
326 (based on logistic rules, like minimum stock, MTO, etc.)
328 Once confirmed, a request for quotation becomes a purchase order.
329 In the Purchase Settings, you can select the way to control supplier invoicing:
330 based on the order, based on receptions, or manual.
333 <menuitem action="purchase_rfq" id="menu_purchase_rfq"
334 parent="menu_procurement_management"
337 <record id="purchase_form_action" model="ir.actions.act_window">
338 <field name="name">Purchase Orders</field>
339 <field name="type">ir.actions.act_window</field>
340 <field name="res_model">purchase.order</field>
341 <field name="view_mode">tree,form,graph,calendar</field>
342 <field name="context">{'search_default_approved': 1}</field>
343 <field name="search_view_id" ref="view_purchase_order_filter"/>
344 <field name="help">Use this menu to search within your purchase orders by references, supplier, products, etc. For each purchase order, you can track the products received, and control the supplier invoices.</field>
346 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
348 <record id="purchase_order_line_form" model="ir.ui.view">
349 <field name="name">purchase.order.line.form</field>
350 <field name="model">purchase.order.line</field>
351 <field name="type">form</field>
352 <field name="arch" type="xml">
353 <form string="Purchase Order Line" version="7.0">
357 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,context)"/>
358 <label for="product_qty"/>
360 <field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,context)" class="oe_inline"/>
361 <field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,context)" class="oe_inline"/>
363 <field name="price_unit"/>
364 <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
368 <field name="date_planned" widget="date"/>
369 <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
370 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
372 <group string="Notes" colspan="4">
373 <field name="notes" nolabel="1" placeholder="Add a note on the purchase line..."/>
375 <group string="Invoices" colspan="4">
376 <field name="invoice_lines" nolabel="1"/>
378 <group string="Stock Moves" colspan="4">
379 <field name="move_ids" nolabel="1"/>
387 <record id="purchase_order_line_tree" model="ir.ui.view">
388 <field name="name">purchase.order.line.tree</field>
389 <field name="model">purchase.order.line</field>
390 <field name="type">tree</field>
391 <field name="arch" type="xml">
392 <tree string="Purchase Order Lines">
393 <field name="order_id"/>
395 <field name="partner_id" string="Supplier" />
396 <field name="product_id"/>
397 <field name="price_unit"/>
398 <field name="product_qty"/>
399 <field name="product_uom" groups="product.group_uom"/>
400 <field name="price_subtotal"/>
401 <field name="date_planned" widget="date" width="135"/>
402 <field name="state" invisible="1"/>
403 <field name="invoiced" invisible="1"/>
407 <record id="purchase_order_line_form2" model="ir.ui.view">
408 <field name="name">purchase.order.line.form2</field>
409 <field name="model">purchase.order.line</field>
410 <field name="type">form</field>
411 <field name="priority" eval="20"/>
412 <field name="arch" type="xml">
413 <form string="Purchase Order Line" version="7.0">
415 <label for="order_id" class="oe_edit_only"/>
417 <field name="order_id" class="oe_inline"/>
418 <label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
419 <field name="date_order" class="oe_inline"/>
421 <label for="partner_id" class="oe_edit_only"/>
422 <h2><field name="partner_id"/></h2>
427 <field name="product_id" readonly="1"/>
428 <label for="product_qty"/>
430 <field name="product_qty" readonly="1" class="oe_inline"/>
431 <field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
433 <field name="price_unit"/>
436 <field name="date_planned" widget="date" readonly="1"/>
437 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
438 <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
439 <field name="taxes_id" widget="many2many_tags"
440 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
441 <field name="invoiced"/>
444 <separator string="Manual Invoices"/>
445 <field name="invoice_lines"/>
446 <separator string="Notes"/>
447 <field name="notes"/>
448 <separator string="Stock Moves"/>
449 <field name="move_ids"/>
454 <record id="purchase_order_line_search" model="ir.ui.view">
455 <field name="name">purchase.order.line.search</field>
456 <field name="model">purchase.order.line</field>
457 <field name="type">search</field>
458 <field name="arch" type="xml">
459 <search string="Search Purchase Order">
461 <field name="order_id"/>
462 <field name="product_id"/>
463 <field name="partner_id" string="Supplier"/>
466 <group expand="0" string="Group By...">
467 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
468 <separator orientation="vertical"/>
469 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
470 <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
471 <separator orientation="vertical"/>
472 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
479 context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
480 id="act_res_partner_2_purchase_order"
481 name="RFQs and Purchases"
482 groups="purchase.group_purchase_user"
483 res_model="purchase.order"
484 src_model="res.partner"/>
487 context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
488 id="action_purchase_line_product_tree"
490 res_model="purchase.order.line"
491 src_model="product.product"
492 groups="purchase.group_purchase_user"/>
495 <record id="purchase_line_form_action2" model="ir.actions.act_window">
496 <field name="name">Based on Purchase Order Lines</field>
497 <field name="type">ir.actions.act_window</field>
498 <field name="res_model">purchase.order.line</field>
499 <field name="domain">[('order_id.invoice_method','<>','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
500 <field name="view_type">form</field>
501 <field name="view_mode">tree,form</field>
502 <field name="search_view_id" ref="purchase_order_line_search"/>
504 Here you can track all the lines of purchase orders where the invoicing is "Based on Purchase Order Lines",
505 and for which you have not received a supplier invoice yet.
506 You can generate a draft supplier invoice based on the lines from this list.
509 <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
510 <field eval="1" name="sequence"/>
511 <field name="view_mode">tree</field>
512 <field name="view_id" ref="purchase_order_line_tree"/>
513 <field name="act_window_id" ref="purchase_line_form_action2"/>
515 <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
516 <field eval="2" name="sequence"/>
517 <field name="view_mode">form</field>
518 <field name="view_id" ref="purchase_order_line_form2"/>
519 <field name="act_window_id" ref="purchase_line_form_action2"/>
522 action="purchase_line_form_action2"
523 id="menu_purchase_line_order_draft"
524 parent="menu_procurement_management_invoice"
531 <record id="view_procurement_form_inherit" model="ir.ui.view">
532 <field name="name">procurement.order.form.inherit</field>
533 <field name="model">procurement.order</field>
534 <field name="inherit_id" ref="procurement.procurement_form_view"/>
535 <field name="type">form</field>
536 <field name="arch" type="xml">
537 <xpath expr="//field[@name='close_move']" position="before">
538 <field name="purchase_id"/>