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 action="product.product_pricelist_action" id="menu_product_pricelist_action_purhase"
16 parent="menu_purchase_config_purchase" sequence="2"/>
19 action="product.product_pricelist_action2" id="menu_product_pricelist_action2_purchase"
20 parent="menu_purchase_config_purchase" sequence="1"/>
23 <!--supplier addresses action-->
24 <record id="action_supplier_address_form" model="ir.actions.act_window">
25 <field name="name">Addresses</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">res.partner.address</field>
28 <field name="view_type">form</field>
29 <field name="context">{"search_default_supplier":1}</field>
30 <field name="search_view_id" ref="base.view_res_partner_address_filter"/>
31 <field name="help">Access your supplier records and maintain your relationship with them. You can track all your interactions with them through the history tab: emails, orders, meeting, etc.</field>
33 <record id="action_supplier_address_form_view1" model="ir.actions.act_window.view">
34 <field eval="10" name="sequence"/>
35 <field name="view_mode">tree</field>
36 <field name="view_id" ref="base.view_partner_address_tree"/>
37 <field name="act_window_id" ref="action_supplier_address_form"/>
39 <record id="action_supplier_address_form_view2" model="ir.actions.act_window.view">
40 <field eval="20" name="sequence"/>
41 <field name="view_mode">form</field>
42 <field name="view_id" ref="base.view_partner_address_form1"/>
43 <field name="act_window_id" ref="action_supplier_address_form"/>
47 <menuitem id="base.menu_procurement_management_supplier" name="Address Book"
48 parent="base.menu_purchase_root" sequence="3"/>
49 <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
50 parent="base.menu_procurement_management_supplier"
51 action="base.action_partner_supplier_form" sequence="1"/>
53 <!--Inventory control-->
54 <menuitem id="menu_procurement_management_inventory" name="Receive Products"
55 parent="base.menu_purchase_root" sequence="4"/>
56 <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
57 name="Incoming Shipments" sequence="9"
58 groups="base.group_extended"/>
59 <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
60 parent="menu_procurement_management_inventory" sequence="11"/>
62 <!--Invoice control-->
63 <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
64 parent="base.menu_purchase_root" sequence="6"/>
66 <record id="action_invoice_pending" model="ir.actions.act_window">
67 <field name="res_model">account.invoice</field>
68 <field name="view_type">form</field>
69 <field name="view_mode">tree,form,calendar,graph</field>
70 <field eval="False" name="view_id"/>
71 <field name="domain">[('type','=','in_invoice')]</field>
72 <field name="context">{'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
73 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
74 <field name="help">Use this menu to control the invoices to be received by your supplier. OpenERP pre-generates draft of invoices based on your purchase orders or your receptions. Once you receive a supplier invoice, you can control it according to the draft of invoice and validate it.</field>
77 <menuitem name="Supplier Invoices to Receive"
78 id="menu_procurement_management_pending_invoice"
79 action="action_invoice_pending"
80 parent="menu_procurement_management_invoice"
84 <menuitem id="menu_procurement_management_product" name="Products"
85 parent="base.menu_purchase_root" sequence="8"/>
86 <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
87 parent="menu_procurement_management_product"/>
89 <record model="ir.ui.view" id="purchase_order_calendar">
90 <field name="name">purchase.order.calendar</field>
91 <field name="model">purchase.order</field>
92 <field name="type">calendar</field>
93 <field name="priority" eval="2"/>
94 <field name="arch" type="xml">
95 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
97 <field name="amount_total"/>
98 <field name="partner_id"/>
102 <record model="ir.ui.view" id="view_purchase_order_graph">
103 <field name="name">purchase.order.graph</field>
104 <field name="model">purchase.order</field>
105 <field name="type">graph</field>
106 <field name="arch" type="xml">
107 <graph string="Purchase Order" type="bar">
108 <field name="partner_id"/>
109 <field name="amount_total" operator="+"/>
114 <record id="purchase_order_form" model="ir.ui.view">
115 <field name="name">purchase.order.form</field>
116 <field name="model">purchase.order</field>
117 <field name="type">form</field>
118 <field name="arch" type="xml">
119 <form string="Purchase Order">
120 <group col="6" colspan="4">
122 <field name="date_order"/>
123 <field name="invoiced"/>
125 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
126 <field name="partner_ref"/>
127 <field name="shipped"/>
128 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
130 <notebook colspan="4">
131 <page string="Purchase Order">
132 <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" />
133 <field name="partner_address_id"/>
134 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
135 <field name="origin" groups="base.group_extended"/>
137 <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
138 <tree string="Purchase Order Lines">
139 <field name="date_planned"/>
141 <field name="product_qty"/>
142 <field name="product_uom"/>
143 <field name="price_unit"/>
144 <field name="price_subtotal"/>
146 <!-- default form view -->
148 <group col="7" colspan="4">
149 <field name="amount_untaxed" sum="Untaxed amount"/>
150 <field name="amount_tax"/>
151 <field name="amount_total" sum="Total amount"/>
152 <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
154 <group col="11" colspan="4">
155 <field name="state" readonly="1"/>
156 <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
157 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
158 <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
159 <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
160 <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
161 <button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
162 <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
163 <button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-go-forward"/>
164 <button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
167 <page string="Delivery & Invoicing" groups="base.group_extended">
168 <group colspan="2" col="2">
169 <separator string="Delivery" colspan="2"/>
170 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
171 <field name="minimum_planned_date"/>
172 <field name="location_id"/>
174 <group colspan="2" col="2">
175 <separator string="Invoice Control" colspan="2"/>
176 <field name="invoice_method"/>
177 <field name="invoice_id" readonly="1" groups="base.group_extended" />
178 <field name="fiscal_position" widget="selection"/>
181 <separator string="Purchase Control" colspan="4"/>
182 <field name="validator"/>
183 <field name="date_approve"/>
185 <page string="Notes">
186 <field colspan="4" name="notes" nolabel="1"/>
193 <record id="view_purchase_order_filter" model="ir.ui.view">
194 <field name="name">purchase.order.list.select</field>
195 <field name="model">purchase.order</field>
196 <field name="type">search</field>
197 <field name="arch" type="xml">
198 <search string="Search Purchase Order">
199 <group col='10' colspan='4'>
200 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" separator="1" help="Purchase order which are in draft state"/>
201 <filter icon="terp-camera_test" name="confirmed" string="To Approve" domain="[('state','in',('wait','confirmed'))]" separator="1" help="Purchase order to be approved"/>
202 <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" separator="1" help="Approved purchase order"/>
203 <separator orientation="vertical"/>
204 <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"/>
205 <separator orientation="vertical"/>
206 <filter icon="terp-gtk-go-back-rtl" string="To be Invoiced" domain="[('invoiced','=',1)]" separator="1" help="Purchase order to be invoiced"/>
207 <separator orientation="vertical"/>
208 <field name="name" select="1" string="Reference"/>
209 <field name="partner_id" select="1"/>
210 <field name="product_id" select="1"/>
211 <field name="create_uid" select="1"/>
214 <group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
215 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
216 <separator orientation="vertical"/>
217 <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
218 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
219 <separator orientation="vertical"/>
220 <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
221 <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
227 <record id="purchase_order_tree" model="ir.ui.view">
228 <field name="name">purchase.order.tree</field>
229 <field name="model">purchase.order</field>
230 <field name="type">tree</field>
231 <field name="arch" type="xml">
232 <tree colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
233 <field name="name" string="Reference"/>
234 <field name="date_order" string="Order Date"/>
235 <field name="partner_id"/>
236 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
237 <field name="location_id"/>
238 <field name="minimum_planned_date"/>
239 <field name="origin"/>
240 <field name="invoiced_rate" widget="progressbar"/>
241 <field name="shipped_rate" widget="progressbar"/>
242 <field name="amount_untaxed" sum="Total Untaxed amount"/>
243 <field name="amount_total" sum="Total amount"/>
244 <field name="state"/>
249 <record id="purchase_rfq" model="ir.actions.act_window">
250 <field name="name">Requests for Quotation</field>
251 <field name="type">ir.actions.act_window</field>
252 <field name="res_model">purchase.order</field>
253 <field name="view_type">form</field>
254 <field name="context">{'search_default_draft': 1}</field>
255 <field name="view_mode">tree,form,graph,calendar</field>
256 <field name="search_view_id" ref="view_purchase_order_filter"/>
257 <field name="help">With the Requests for quotation menu you can create new request for quotations, review existing one and confirm them to 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, invoice to control.</field>
259 <menuitem action="purchase_rfq" id="menu_purchase_rfq" parent="menu_procurement_management"
260 sequence="6" groups="group_purchase_manager,group_purchase_user"/>
262 <record id="purchase_form_action" model="ir.actions.act_window">
263 <field name="name">Purchase Orders</field>
264 <field name="type">ir.actions.act_window</field>
265 <field name="res_model">purchase.order</field>
266 <field name="view_mode">tree,form,graph,calendar</field>
267 <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
268 <field name="search_view_id" ref="view_purchase_order_filter"/>
269 <field name="help">From the Purchase Orders menu, you can track the status of your orders: products received, invoice received and controlled.
272 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" />
275 <record id="purchase_order_line_form" model="ir.ui.view">
276 <field name="name">purchase.order.line.form</field>
277 <field name="model">purchase.order.line</field>
278 <field name="type">form</field>
279 <field name="arch" type="xml">
280 <form string="Purchase Order Line">
281 <notebook colspan="4">
282 <page string="Order Line">
283 <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)"/>
284 <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)"/>
285 <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)"/>
286 <field colspan="4" name="name"/>
287 <field name="date_planned" widget="date"/>
288 <field name="price_unit"/>
289 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
290 <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]" />
291 <group colspan="4" col="4" groups="base.group_extended">
292 <separator colspan="4" string="Taxes"/>
293 <field colspan="4" nolabel="1" name="taxes_id"
294 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
297 <page string="Invoicing" groups="base.group_extended">
298 <separator colspan="4" string="Manual Invoices"/>
299 <field name="invoiced"/>
301 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
303 <page string="Notes">
304 <field colspan="4" name="notes" nolabel="1"/>
306 <page string="History" groups="base.group_extended">
307 <separator colspan="4" string="Stock Moves"/>
308 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
315 <record id="purchase_order_line_tree" model="ir.ui.view">
316 <field name="name">purchase.order.line.tree</field>
317 <field name="model">purchase.order.line</field>
318 <field name="type">tree</field>
319 <field name="arch" type="xml">
320 <tree string="Purchase Order Lines">
321 <field name="order_id"/>
323 <field name="partner_id" string="Supplier" />
324 <field name="product_id"/>
325 <field name="price_unit"/>
326 <field name="product_qty"/>
327 <field name="product_uom"/>
328 <field name="price_subtotal"/>
329 <field name="date_planned" widget="date" width="135"/>
333 <field name="state" invisible="1"/>
334 <field name="invoiced" invisible="1"/>
338 <record id="purchase_order_line_form2" model="ir.ui.view">
339 <field name="name">purchase.order.line.form2</field>
340 <field name="model">purchase.order.line</field>
341 <field name="type">form</field>
342 <field name="priority" eval="20"/>
343 <field name="arch" type="xml">
344 <form string="Purchase Order Line">
345 <notebook colspan="4">
346 <page string="Order Line">
347 <separator colspan="4" string="General Information"/>
348 <field name="order_id"/>
349 <field name="product_id" readonly="1" />
350 <field name="product_qty" readonly="1" />
351 <field name="product_uom" readonly="1"/>
352 <field colspan="4" name="name"/>
353 <field name="date_planned" widget="date" readonly="1"/>
354 <field name="price_unit"/>
355 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
356 <field name="account_analytic_id" colspan="4" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
357 <group colspan="4" col="4" groups="base.group_extended">
358 <separator colspan="4" string="Taxes"/>
359 <field colspan="4" nolabel="1" name="taxes_id"
360 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
363 <page string="Invoicing" groups="base.group_extended">
364 <separator colspan="4" string="Manual Invoices"/>
365 <field name="invoiced"/>
367 <field colspan="4" name="invoice_lines" nolabel="1" widget="many2many"/>
369 <page string="Notes">
370 <field colspan="4" name="notes" nolabel="1"/>
372 <page string="History" groups="base.group_extended">
373 <separator colspan="4" string="Stock Moves"/>
374 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
380 <record id="purchase_order_line_search" model="ir.ui.view">
381 <field name="name">purchase.order.line.search</field>
382 <field name="model">purchase.order.line</field>
383 <field name="type">search</field>
384 <field name="arch" type="xml">
385 <search string="Search Purchase Order">
387 <field name="order_id"/>
388 <field name="product_id"/>
389 <field name="partner_id" string="Supplier"/>
392 <group expand="0" string="Group By...">
393 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
394 <separator orientation="vertical"/>
395 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
396 <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
397 <separator orientation="vertical"/>
398 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
405 context="{'search_default_partner_id': [active_id]}"
406 id="act_res_partner_2_purchase_order"
407 name="Purchase Orders"
408 res_model="purchase.order"
409 src_model="res.partner"/>
412 context="{'search_default_product_id': [active_id]}"
413 id="action_purchase_line_product_tree"
415 res_model="purchase.order.line"
416 src_model="product.product"
417 groups="base.group_extended"/>
420 <record id="purchase_line_form_action2" model="ir.actions.act_window">
421 <field name="name">Purchase Lines Not Invoiced</field>
422 <field name="type">ir.actions.act_window</field>
423 <field name="res_model">purchase.order.line</field>
424 <field name="domain">[('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
425 <field name="view_type">form</field>
426 <field name="view_mode">tree,form</field>
427 <field name="search_view_id" ref="purchase_order_line_search"/>
428 <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 did 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>
430 <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
431 <field eval="1" name="sequence"/>
432 <field name="view_mode">tree</field>
433 <field name="view_id" ref="purchase_order_line_tree"/>
434 <field name="act_window_id" ref="purchase_line_form_action2"/>
436 <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
437 <field eval="2" name="sequence"/>
438 <field name="view_mode">form</field>
439 <field name="view_id" ref="purchase_order_line_form2"/>
440 <field name="act_window_id" ref="purchase_line_form_action2"/>
443 action="purchase_line_form_action2"
444 id="menu_purchase_line_order_draft"
445 groups="base.group_extended"
446 parent="menu_procurement_management_invoice"
453 <record id="view_procurement_form_inherit" model="ir.ui.view">
454 <field name="name">procurement.order.form.inherit</field>
455 <field name="model">procurement.order</field>
456 <field name="inherit_id" ref="procurement.procurement_form_view"/>
457 <field name="type">form</field>
458 <field name="arch" type="xml">
459 <xpath expr="/form/notebook/page/field[@name='close_move']" position="before">
460 <field name="purchase_id"/>