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 Management"
9 parent="base.menu_purchase_root" sequence="1" />
11 <menuitem id="menu_purchase_config_purchase" name="Configuration"
12 parent="base.menu_purchase_root" sequence="100"/>
15 id="menu_purchase_config_pricelist" name="Pricelists"
16 parent="menu_purchase_config_purchase" sequence="50"/>
19 action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
20 parent="menu_purchase_config_pricelist" sequence="20"/>
23 action="product.product_pricelist_action2" id="menu_product_pricelist_action2_purchase"
24 parent="menu_purchase_config_pricelist" sequence="10"/>
27 action="product.product_pricelist_type_action" id="menu_purchase_product_pricelist_type"
28 parent="menu_purchase_config_pricelist" sequence="2"
29 groups="base.group_extended"/>
32 id="menu_product_in_config_purchase" name="Product"
33 parent="menu_purchase_config_purchase" sequence="30"/>
36 action="product.product_category_action_form" id="menu_product_category_config_purchase"
37 parent="purchase.menu_product_in_config_purchase" sequence="10"/>
40 id="menu_purchase_unit_measure_purchase" name="Units of Measure"
41 parent="purchase.menu_product_in_config_purchase" sequence="20"/>
44 action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
45 parent="menu_purchase_unit_measure_purchase" sequence="30"/>
48 action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
49 parent="menu_purchase_unit_measure_purchase" sequence="30"/>
52 <!--supplier addresses action-->
53 <record id="action_supplier_address_form" model="ir.actions.act_window">
54 <field name="name">Addresses</field>
55 <field name="type">ir.actions.act_window</field>
56 <field name="res_model">res.partner.address</field>
57 <field name="view_type">form</field>
58 <field name="context">{"search_default_supplier":1}</field>
59 <field name="search_view_id" ref="base.view_res_partner_address_filter"/>
60 <field name="help">Access your supplier records and maintain a good relationship with your suppliers. You can track all your interactions with them through the History tab: emails, orders, meetings, etc.</field>
62 <record id="action_supplier_address_form_view1" model="ir.actions.act_window.view">
63 <field eval="10" name="sequence"/>
64 <field name="view_mode">tree</field>
65 <field name="view_id" ref="base.view_partner_address_tree"/>
66 <field name="act_window_id" ref="action_supplier_address_form"/>
68 <record id="action_supplier_address_form_view2" model="ir.actions.act_window.view">
69 <field eval="20" name="sequence"/>
70 <field name="view_mode">form</field>
71 <field name="view_id" ref="base.view_partner_address_form1"/>
72 <field name="act_window_id" ref="action_supplier_address_form"/>
76 <menuitem id="base.menu_procurement_management_supplier" name="Address Book"
77 parent="base.menu_purchase_root" sequence="3"/>
78 <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
79 parent="base.menu_procurement_management_supplier"
80 action="base.action_partner_supplier_form" sequence="1"/>
82 <!--Inventory control-->
83 <menuitem id="menu_procurement_management_inventory" name="Receive Products"
84 parent="base.menu_purchase_root" sequence="4"/>
85 <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
86 name="Incoming Shipments" sequence="9"
87 groups="base.group_extended"/>
88 <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
89 parent="menu_procurement_management_inventory" sequence="11"/>
91 <!--Invoice control-->
92 <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
93 parent="base.menu_purchase_root" sequence="6"/>
95 <record id="action_invoice_pending" model="ir.actions.act_window">
96 <field name="res_model">account.invoice</field>
97 <field name="view_type">form</field>
98 <field name="view_mode">tree,form,calendar,graph</field>
99 <field eval="False" name="view_id"/>
100 <field name="domain">[('type','=','in_invoice')]</field>
101 <field name="context">{'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
102 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
103 <field name="help">Use this menu to control the invoices to be received from your supplier. OpenERP pregenerates draft invoices from your purchase orders or receptions, according to your settings. Once you receive a supplier invoice, you can match it with the draft invoice and validate it.</field>
106 <menuitem name="Supplier Invoices to Receive"
107 id="menu_procurement_management_pending_invoice"
108 action="action_invoice_pending"
109 parent="menu_procurement_management_invoice"
113 <menuitem id="menu_procurement_management_product" name="Products"
114 parent="base.menu_purchase_root" sequence="8"/>
116 <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
117 parent="menu_procurement_management_product" sequence="10"/>
119 <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
120 parent="menu_procurement_management_product"/>
122 <record model="ir.ui.view" id="purchase_order_calendar">
123 <field name="name">purchase.order.calendar</field>
124 <field name="model">purchase.order</field>
125 <field name="type">calendar</field>
126 <field name="priority" eval="2"/>
127 <field name="arch" type="xml">
128 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
130 <field name="amount_total"/>
131 <field name="partner_id"/>
135 <record model="ir.ui.view" id="purchase_order_graph">
136 <field name="name">purchase.order.graph</field>
137 <field name="model">purchase.order</field>
138 <field name="type">graph</field>
139 <field name="arch" type="xml">
140 <graph string="Purchase Order" type="bar">
141 <field name="partner_id"/>
142 <field name="amount_total" operator="+"/>
147 <record id="purchase_order_form" model="ir.ui.view">
148 <field name="name">purchase.order.form</field>
149 <field name="model">purchase.order</field>
150 <field name="type">form</field>
151 <field name="arch" type="xml">
152 <form string="Purchase Order">
153 <group col="6" colspan="4">
155 <field name="date_order"/>
156 <field name="invoiced"/>
158 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
159 <field name="partner_ref"/>
160 <field name="shipped"/>
161 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
163 <notebook colspan="4">
164 <page string="Purchase Order">
165 <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" />
166 <field name="partner_address_id"/>
167 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
168 <field name="origin" groups="base.group_extended"/>
170 <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
171 <tree string="Purchase Order Lines">
172 <field name="date_planned"/>
174 <field name="product_qty"/>
175 <field name="product_uom"/>
176 <field name="price_unit"/>
177 <field name="price_subtotal"/>
179 <!-- default form view -->
181 <group col="7" colspan="4">
182 <field name="amount_untaxed" sum="Untaxed amount"/>
183 <field name="amount_tax"/>
184 <field name="amount_total" sum="Total amount"/>
185 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
187 <group col="11" colspan="4">
188 <field name="state" readonly="1"/>
189 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
190 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
191 <button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
192 <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
193 <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
194 <button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
195 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
196 <button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-go-forward"/>
197 <button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
200 <page string="Delivery & Invoicing" groups="base.group_extended">
201 <group colspan="2" col="2">
202 <separator string="Delivery" colspan="2"/>
203 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
204 <field name="minimum_planned_date"/>
205 <field name="location_id"/>
207 <group colspan="2" col="2">
208 <separator string="Invoice Control" colspan="2"/>
209 <field name="invoice_method"/>
210 <field name="fiscal_position" widget="selection"/>
213 <separator string="Purchase Control" colspan="4"/>
214 <field name="validator"/>
215 <field name="date_approve"/>
216 <separator string="Invoices" colspan="4"/>
218 <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4"/>
220 <page string="Notes">
221 <field colspan="4" name="notes" nolabel="1"/>
228 <record id="view_purchase_order_filter" model="ir.ui.view">
229 <field name="name">purchase.order.list.select</field>
230 <field name="model">purchase.order</field>
231 <field name="type">search</field>
232 <field name="arch" type="xml">
233 <search string="Search Purchase Order">
234 <group col='10' colspan='4'>
235 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" separator="1" help="Purchase order which are in draft state"/>
236 <filter icon="terp-camera_test" name="confirmed" string="To Approve" domain="[('state','in',('wait','confirmed'))]" separator="1" help="Purchase order to be approved"/>
237 <filter icon="terp-check" name="approved" string="Approved" domain="[('state','=','approved')]" separator="1" help="Approved purchase order"/>
238 <separator orientation="vertical"/>
239 <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"/>
240 <separator orientation="vertical"/>
241 <filter icon="terp-gtk-go-back-rtl" string="No Invoice" domain="[('invoice_ids','=', False)]" separator="1" help="Purchase order with No Invoice" groups="base.group_extended"/>
242 <separator orientation="vertical"/>
243 <field name="name" select="1" string="Reference"/>
244 <field name="partner_id" select="1"/>
245 <field name="product_id" select="1"/>
246 <field name="create_uid" select="1"/>
249 <group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
250 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
251 <separator orientation="vertical"/>
252 <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
253 <filter string="State" 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="purchase_order_tree" model="ir.ui.view">
263 <field name="name">purchase.order.tree</field>
264 <field name="model">purchase.order</field>
265 <field name="type">tree</field>
266 <field name="arch" type="xml">
267 <tree colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
268 <field name="name" string="Reference"/>
269 <field name="date_order" string="Order Date"/>
270 <field name="partner_id"/>
271 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
272 <field name="location_id"/>
273 <field name="minimum_planned_date"/>
274 <field name="origin"/>
275 <field name="invoiced_rate" widget="progressbar"/>
276 <field name="shipped_rate" widget="progressbar"/>
277 <field name="amount_untaxed" sum="Total Untaxed amount"/>
278 <field name="amount_total" sum="Total amount"/>
279 <field name="state"/>
284 <record id="purchase_rfq" model="ir.actions.act_window">
285 <field name="name">Requests for Quotation</field>
286 <field name="type">ir.actions.act_window</field>
287 <field name="res_model">purchase.order</field>
288 <field name="view_type">form</field>
289 <field name="context">{'search_default_draft': 1}</field>
290 <field name="view_mode">tree,form,graph,calendar</field>
291 <field name="search_view_id" ref="view_purchase_order_filter"/>
292 <field name="help">With the Requests for Quotation menu you can create new requests for quotations, review existing ones or turn them into a purchase order once the supplier offer is approved. When you confirm a RfQ, OpenERP will convert it to a Purchase Order and generate the next steps: draft reception of the products, draft invoice to control.</field>
294 <menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
297 <record id="purchase_form_action" model="ir.actions.act_window">
298 <field name="name">Purchase Orders</field>
299 <field name="type">ir.actions.act_window</field>
300 <field name="res_model">purchase.order</field>
301 <field name="view_mode">tree,form,graph,calendar</field>
302 <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
303 <field name="search_view_id" ref="view_purchase_order_filter"/>
304 <field name="help">From the Purchase Orders menu, you can track the status of your orders: products received, invoice received and controlled.
307 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" />
310 <record id="purchase_order_line_form" model="ir.ui.view">
311 <field name="name">purchase.order.line.form</field>
312 <field name="model">purchase.order.line</field>
313 <field name="type">form</field>
314 <field name="arch" type="xml">
315 <form string="Purchase Order Line">
316 <notebook colspan="4">
317 <page string="Order Line">
318 <field name="product_id" colspan="4" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_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)"/>
319 <field name="product_qty" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_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)"/>
320 <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)"/>
321 <field colspan="4" name="name"/>
322 <field name="date_planned" widget="date"/>
323 <field name="price_unit"/>
324 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
325 <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
326 <group colspan="4" col="4" groups="base.group_extended">
327 <separator colspan="4" string="Taxes"/>
328 <field colspan="4" nolabel="1" name="taxes_id"
329 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
332 <page string="Invoicing" groups="base.group_extended">
333 <separator colspan="4" string="Manual Invoices"/>
334 <field name="invoiced"/>
336 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
338 <page string="Notes">
339 <field colspan="4" name="notes" nolabel="1"/>
341 <page string="History" groups="base.group_extended">
342 <separator colspan="4" string="Stock Moves"/>
343 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
350 <record id="purchase_order_line_tree" model="ir.ui.view">
351 <field name="name">purchase.order.line.tree</field>
352 <field name="model">purchase.order.line</field>
353 <field name="type">tree</field>
354 <field name="arch" type="xml">
355 <tree string="Purchase Order Lines">
356 <field name="order_id"/>
358 <field name="partner_id" string="Supplier" />
359 <field name="product_id"/>
360 <field name="price_unit"/>
361 <field name="product_qty"/>
362 <field name="product_uom"/>
363 <field name="price_subtotal"/>
364 <field name="date_planned" widget="date" width="135"/>
368 <field name="state" invisible="1"/>
369 <field name="invoiced" invisible="1"/>
373 <record id="purchase_order_line_form2" model="ir.ui.view">
374 <field name="name">purchase.order.line.form2</field>
375 <field name="model">purchase.order.line</field>
376 <field name="type">form</field>
377 <field name="priority" eval="20"/>
378 <field name="arch" type="xml">
379 <form string="Purchase Order Line">
380 <notebook colspan="4">
381 <page string="Order Line">
382 <separator colspan="4" string="General Information"/>
383 <field name="order_id"/>
384 <field name="product_id" readonly="1" />
385 <field name="product_qty" readonly="1" />
386 <field name="product_uom" readonly="1"/>
387 <field colspan="4" name="name"/>
388 <field name="date_planned" widget="date" readonly="1"/>
389 <field name="price_unit"/>
390 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
391 <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
392 <group colspan="4" col="4" groups="base.group_extended">
393 <separator colspan="4" string="Taxes"/>
394 <field colspan="4" nolabel="1" name="taxes_id"
395 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
398 <page string="Invoicing" groups="base.group_extended">
399 <separator colspan="4" string="Manual Invoices"/>
400 <field name="invoiced"/>
402 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
404 <page string="Notes">
405 <field colspan="4" name="notes" nolabel="1"/>
407 <page string="History" groups="base.group_extended">
408 <separator colspan="4" string="Stock Moves"/>
409 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
415 <record id="purchase_order_line_search" model="ir.ui.view">
416 <field name="name">purchase.order.line.search</field>
417 <field name="model">purchase.order.line</field>
418 <field name="type">search</field>
419 <field name="arch" type="xml">
420 <search string="Search Purchase Order">
422 <field name="order_id"/>
423 <field name="product_id"/>
424 <field name="partner_id" string="Supplier"/>
427 <group expand="0" string="Group By...">
428 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
429 <separator orientation="vertical"/>
430 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
431 <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
432 <separator orientation="vertical"/>
433 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
440 context="{'search_default_partner_id': [active_id]}"
441 id="act_res_partner_2_purchase_order"
442 name="Purchase Orders"
443 groups="purchase.group_purchase_user"
444 res_model="purchase.order"
445 src_model="res.partner"/>
448 context="{'search_default_product_id': [active_id]}"
449 id="action_purchase_line_product_tree"
451 res_model="purchase.order.line"
452 src_model="product.product"
453 groups="purchase.group_purchase_user"/>
456 <record id="purchase_line_form_action2" model="ir.actions.act_window">
457 <field name="name">Purchase Lines Not Invoiced</field>
458 <field name="type">ir.actions.act_window</field>
459 <field name="res_model">purchase.order.line</field>
460 <field name="domain">[('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
461 <field name="view_type">form</field>
462 <field name="view_mode">tree,form</field>
463 <field name="search_view_id" ref="purchase_order_line_search"/>
464 <field name="help">If you set the invoicing control on a purchase order as "Manual", you can track here all the purchase order lines for which you have not received the supplier invoice yet. Once you are ready to receive a supplier invoice, you can generate a draft supplier invoice based on the lines from this menu.</field>
466 <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
467 <field eval="1" name="sequence"/>
468 <field name="view_mode">tree</field>
469 <field name="view_id" ref="purchase_order_line_tree"/>
470 <field name="act_window_id" ref="purchase_line_form_action2"/>
472 <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
473 <field eval="2" name="sequence"/>
474 <field name="view_mode">form</field>
475 <field name="view_id" ref="purchase_order_line_form2"/>
476 <field name="act_window_id" ref="purchase_line_form_action2"/>
479 action="purchase_line_form_action2"
480 id="menu_purchase_line_order_draft"
481 groups="base.group_extended"
482 parent="menu_procurement_management_invoice"
489 <record id="view_procurement_form_inherit" model="ir.ui.view">
490 <field name="name">procurement.order.form.inherit</field>
491 <field name="model">procurement.order</field>
492 <field name="inherit_id" ref="procurement.procurement_form_view"/>
493 <field name="type">form</field>
494 <field name="arch" type="xml">
495 <xpath expr="/form/notebook/page/field[@name='close_move']" position="before">
496 <field name="purchase_id"/>