1 <?xml version="1.0" encoding="utf-8"?>
6 <menuitem name="Purchases"
7 id="base.menu_purchase_root"
8 groups="group_purchase_manager,group_purchase_user"
11 <menuitem id="menu_procurement_management" name="Purchase"
12 parent="base.menu_purchase_root" sequence="1" />
14 <menuitem id="menu_purchase_config_purchase" name="Configuration"
15 groups="group_purchase_manager"
16 parent="base.menu_purchase_root" sequence="100"/>
18 <record id="purchase_pricelist_version_action" model="ir.actions.act_window">
19 <field name="name">Pricelist Versions</field>
20 <field name="type">ir.actions.act_window</field>
21 <field name="res_model">product.pricelist.version</field>
22 <field name="view_type">form</field>
23 <field name="view_id" ref="product.product_pricelist_version_tree_view"/>
24 <field name="domain">[('pricelist_id.type','=','purchase')]</field>
25 <field name="help" type="html">
26 <p class="oe_view_nocontent_create">
27 Click to add a pricelist version.
29 There can be more than one version of a pricelist, each of
30 these must be valid during a certain period of time. Some
31 examples of versions: Main Prices, 2010, 2011, Summer Sales,
37 id="menu_purchase_config_pricelist" name="Pricelists"
38 parent="menu_purchase_config_purchase" sequence="50" groups="product.group_purchase_pricelist"/>
40 action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
41 parent="menu_purchase_config_pricelist" sequence="1" groups="product.group_purchase_pricelist" />
44 action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
45 parent="menu_purchase_config_pricelist" sequence="1" groups="product.group_purchase_pricelist" />
48 action="purchase_pricelist_version_action" id="menu_purchase_pricelist_version_action"
49 parent="menu_purchase_config_pricelist" sequence="2" groups="product.group_purchase_pricelist"/>
52 action="product.product_price_type_action" id="menu_product_pricelist_action2_purchase_type"
53 parent="menu_purchase_config_pricelist" sequence="60" />
55 id="menu_product_in_config_purchase" name="Products"
56 parent="menu_purchase_config_purchase" sequence="30" groups="base.group_no_one"/>
59 action="product.product_category_action_form" id="menu_product_category_config_purchase"
60 parent="purchase.menu_product_in_config_purchase" sequence="1" />
63 id="menu_purchase_unit_measure_purchase" name="Units of Measure"
64 parent="purchase.menu_product_in_config_purchase" sequence="20" groups="product.group_uom"/>
67 action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
68 parent="purchase.menu_product_in_config_purchase" sequence="5" />
71 action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
72 parent="purchase.menu_product_in_config_purchase" sequence="10"/>
75 id="menu_purchase_partner_cat" name="Address Book"
76 parent="menu_purchase_config_purchase"/>
79 action="base.action_partner_category_form" id="menu_partner_categories_in_form" name="Partner Tags"
80 parent="purchase.menu_purchase_partner_cat" groups="base.group_no_one"/>
83 <menuitem id="base.menu_procurement_management_supplier_name" name="Suppliers"
84 parent="menu_procurement_management"
85 action="base.action_partner_supplier_form" sequence="15"/>
87 <!--Inventory control-->
88 <menuitem id="menu_procurement_management_inventory" name="Incoming Products"
89 parent="base.menu_purchase_root" sequence="4"/>
90 <menuitem action="stock.action_picking_tree4" id="menu_action_picking_tree4" parent="menu_procurement_management_inventory"
91 name="Incoming Shipments" sequence="9"/>
92 <menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
93 parent="menu_procurement_management_inventory" sequence="11"/>
95 <!--Invoice control-->
96 <menuitem id="menu_procurement_management_invoice" name="Invoice Control"
97 parent="base.menu_purchase_root" sequence="6"/>
99 <record id="action_invoice_pending" model="ir.actions.act_window">
100 <field name="name">On Draft Invoices</field>
101 <field name="res_model">account.invoice</field>
102 <field name="view_type">form</field>
103 <field name="view_mode">tree,form,calendar,graph</field>
104 <field eval="False" name="view_id"/>
105 <field name="domain">[('type','=','in_invoice')]</field>
106 <field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
107 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
108 <field name="help" type="html">
109 <p class="oe_view_nocontent_create">
110 Click to create a draft invoice.
112 Use this menu to control the invoices to be received from your
113 supplier. OpenERP generates draft invoices from your purchase
114 orders or receptions, according to your settings.
116 Once you receive a supplier invoice, you can match it with the
117 draft invoice and validate it.
123 id="menu_procurement_management_pending_invoice"
124 action="action_invoice_pending"
125 parent="menu_procurement_management_invoice"
129 <menuitem id="menu_procurement_management_product" name="Products"
130 parent="base.menu_purchase_root" sequence="8"/>
132 <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
133 parent="menu_procurement_management_product" sequence="10"/>
135 <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
136 parent="menu_procurement_management_product"/>
138 <record model="ir.ui.view" id="purchase_order_calendar">
139 <field name="name">purchase.order.calendar</field>
140 <field name="model">purchase.order</field>
141 <field name="priority" eval="2"/>
142 <field name="arch" type="xml">
143 <calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
145 <field name="amount_total"/>
146 <field name="partner_id"/>
150 <record model="ir.ui.view" id="purchase_order_graph">
151 <field name="name">purchase.order.graph</field>
152 <field name="model">purchase.order</field>
153 <field name="arch" type="xml">
154 <graph string="Purchase Order" type="bar">
155 <field name="partner_id"/>
156 <field name="amount_total" operator="+"/>
161 <record id="purchase_order_form" model="ir.ui.view">
162 <field name="name">purchase.order.form</field>
163 <field name="model">purchase.order</field>
164 <field name="arch" type="xml">
165 <form string="Purchase Order" version="7.0">
167 <button name="wkf_send_rfq" states="draft" string="Send by Email" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
168 <button name="wkf_send_rfq" states="sent" string="Send by Email" type="object" context="{'send_rfq':True}"/>
169 <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
170 <button name="print_quotation" string="Print" type="object" states="sent" groups="base.group_user"/>
171 <button name="purchase_confirm" states="draft" string="Confirm Order"/>
172 <button name="purchase_confirm" states="sent" string="Confirm Order" class="oe_highlight"/>
173 <button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object" class="oe_highlight"/>
174 <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel Order" type="object" />
175 <button name="picking_ok" states="except_picking" string="Manually Corrected"/>
176 <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
177 <button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
178 <button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
179 <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','in', ['picking', 'manual']), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
180 <button name="action_cancel_draft" states="cancel,confirmed" string="Set to Draft" type="object" />
181 <button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel"/>
182 <field name="state" widget="statusbar" statusbar_visible="draft,sent,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
185 <div class="oe_title">
187 <label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
188 <label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
189 <field name="name" class="oe_inline" readonly="1"/>
194 <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}" domain="[('supplier','=',True)]"/>
195 <field name="partner_ref"/>
196 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
197 <field name="currency_id" groups="base.group_multi_currency"/>
198 <field name="journal_id" invisible='1'/>
201 <field name="date_order"/>
202 <field name="origin" attrs="{'invisible': [('origin','=',False)]}"/>
203 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" options="{'no_create': True}" groups="stock.group_locations"/>
204 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
208 <page string="Purchase Order">
209 <field name="order_line">
210 <tree string="Purchase Order Lines" editable="bottom">
211 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
213 <field name="date_planned"/>
214 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
215 <field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('type','not in',('view','template'))]"/>
216 <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,context)"/>
217 <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,context)"/>
218 <field name="price_unit"/>
219 <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
220 <field name="price_subtotal"/>
223 <group class="oe_subtotal_footer oe_right">
224 <field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
225 <field name="amount_tax" widget="monetary" options="{'currency_field': 'currency_id'}"/>
226 <div class="oe_subtotal_footer_separator oe_inline">
227 <label for="amount_total"/>
228 <button name="button_dummy"
229 states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
231 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
233 <div class="oe_clear"/>
234 <field name="notes" class="oe_inline" placeholder="Terms and conditions..."/>
236 <page string="Incoming Shipments & Invoices">
239 <field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)" groups="stock.group_locations"/>
240 <field name="minimum_planned_date"/>
241 <field name="location_id" groups="stock.group_locations"/>
242 <field name="shipped" groups="base.group_no_one"/>
245 <field name="invoice_method"/>
246 <field name="invoiced"/>
247 <field name="payment_term_id" widget="selection"/>
248 <field name="fiscal_position" attrs="{'readonly': [('invoiced','=', True)]}" />
249 <!-- We do not need these fields anymore, the information is in open chatter -->
250 <field name="validator" groups="base.group_no_one"/>
251 <field name="date_approve" groups="base.group_no_one"/>
257 <div class="oe_chatter">
258 <field name="message_follower_ids" widget="mail_followers"/>
259 <field name="message_ids" widget="mail_thread"/>
265 <record id="view_request_for_quotation_filter" model="ir.ui.view">
266 <field name="name">request.quotation.select</field>
267 <field name="model">purchase.order</field>
268 <field name="arch" type="xml">
269 <search string="Search Purchase Order">
270 <field name="name" string="Reference"/>
271 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase order which are in draft state"/>
272 <filter icon="terp-check" name="approved" string="Approved" domain="[('state','in',('approved','done'))]" help="Approved purchase order"/>
273 <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"/>
275 <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."/>
276 <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
277 <field name="product_id"/>
278 <field name="create_uid"/>
279 <group expand="0" string="Group By...">
280 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
281 <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
282 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
283 <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
284 <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
290 <record id="view_purchase_order_filter" model="ir.ui.view">
291 <field name="name">purchase.order.list.select</field>
292 <field name="model">purchase.order</field>
293 <field name="arch" type="xml">
294 <search string="Search Purchase Order">
295 <field name="name" string="Reference"/>
296 <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
298 <filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','in',('draft','sent'))]" help="Purchase orders that haven't yet been confirmed"/>
299 <filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]" help="Approved purchase orders"/>
300 <filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
302 <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."/>
303 <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
304 <field name="product_id"/>
305 <field name="create_uid"/>
306 <group expand="0" string="Group By...">
307 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
308 <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
309 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
310 <filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
311 <filter string="Expected Month" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
317 <record id="purchase_order_tree" model="ir.ui.view">
318 <field name="name">purchase.order.tree</field>
319 <field name="model">purchase.order</field>
320 <field name="arch" type="xml">
321 <tree fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('wait','confirmed');red:state in ('except_invoice','except_picking')" string="Purchase Order">
322 <field name="message_unread" invisible="1"/>
323 <field name="name" string="Reference"/>
324 <field name="date_order" />
325 <field name="partner_id"/>
326 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
327 <field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
328 <field name="origin"/>
329 <field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed"/>
330 <field name="amount_total" sum="Total amount"/>
331 <field name="state"/>
336 <record id="purchase_rfq" model="ir.actions.act_window">
337 <field name="name">Quotations</field>
338 <field name="type">ir.actions.act_window</field>
339 <field name="res_model">purchase.order</field>
340 <field name="context">{}</field>
341 <field name="domain">[('state','in',('draft','sent','cancel', 'confirmed'))]</field>
342 <field name="view_mode">tree,form,graph,calendar</field>
343 <field name="search_view_id" ref="view_purchase_order_filter"/>
344 <field name="help" type="html">
345 <p class="oe_view_nocontent_create">
346 Click to create a request for quotation.
348 The quotation contains the history of the discussion/negociation
349 you had with your supplier. Once confirmed, a request for
350 quotation is converted into a purchase order.
352 Most propositions of purchase orders are created automatically
353 by OpenERP based on inventory needs.
357 <menuitem action="purchase_rfq" id="menu_purchase_rfq"
358 parent="menu_procurement_management"
361 <record id="purchase_form_action" model="ir.actions.act_window">
362 <field name="name">Purchase Orders</field>
363 <field name="type">ir.actions.act_window</field>
364 <field name="res_model">purchase.order</field>
365 <field name="view_mode">tree,form,graph,calendar</field>
366 <field name="context">{}</field>
367 <field name="domain">[('state','not in',('draft','sent','confirmed'))]</field>
368 <field name="search_view_id" ref="view_purchase_order_filter"/>
369 <field name="help" type="html">
370 <p class="oe_view_nocontent_create">
371 Click to create a quotation that will be converted into a purchase order.
373 Use this menu to search within your purchase orders by
374 references, supplier, products, etc. For each purchase order,
375 you can track the related discussion with the supplier, control
376 the products received and control the supplier invoices.
380 <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
382 <record id="purchase_order_line_form" model="ir.ui.view">
383 <field name="name">purchase.order.line.form</field>
384 <field name="model">purchase.order.line</field>
385 <field name="arch" type="xml">
386 <form string="Purchase Order Line" version="7.0">
390 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
391 <label for="product_qty"/>
393 <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,context)" class="oe_inline"/>
394 <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,context)" class="oe_inline"/>
396 <field name="price_unit"/>
399 <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
400 <field name="date_planned" widget="date"/>
401 <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
402 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
406 <page string="Notes">
408 </page><page string="Invoices and Receptions">
409 <field name="invoice_lines"/>
410 <field name="move_ids"/>
418 <record id="purchase_order_line_tree" model="ir.ui.view">
419 <field name="name">purchase.order.line.tree</field>
420 <field name="model">purchase.order.line</field>
421 <field name="arch" type="xml">
422 <tree string="Purchase Order Lines" create="false">
423 <field name="order_id"/>
425 <field name="partner_id" string="Supplier" />
426 <field name="product_id"/>
427 <field name="price_unit"/>
428 <field name="product_qty"/>
429 <field name="product_uom" groups="product.group_uom"/>
430 <field name="price_subtotal"/>
431 <field name="date_planned" widget="date" width="135"/>
432 <field name="state" invisible="1"/>
433 <field name="invoiced" invisible="1"/>
437 <record id="purchase_order_line_form2" model="ir.ui.view">
438 <field name="name">purchase.order.line.form2</field>
439 <field name="model">purchase.order.line</field>
440 <field name="priority" eval="20"/>
441 <field name="arch" type="xml">
442 <form string="Purchase Order Line" version="7.0" create="false">
444 <label for="order_id" class="oe_edit_only"/>
446 <field name="order_id" class="oe_inline" domain="[('invoice_method','=','manual')]" />
447 <label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
448 <field name="date_order" class="oe_inline"/>
450 <label for="partner_id" class="oe_edit_only"/>
451 <h2><field name="partner_id"/></h2>
454 <field name="product_id" readonly="1"/>
455 <label for="product_qty"/>
457 <field name="product_qty" readonly="1" class="oe_inline"/>
458 <field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
460 <field name="price_unit"/>
463 <field name="taxes_id" widget="many2many_tags"
464 domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
465 <field name="date_planned" widget="date" readonly="1"/>
466 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
467 <field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting"/>
468 <field name="invoiced"/>
472 <separator string="Manual Invoices"/>
473 <field name="invoice_lines"/>
474 <separator string="Stock Moves"/>
475 <field name="move_ids"/>
480 <record id="purchase_order_line_search" model="ir.ui.view">
481 <field name="name">purchase.order.line.search</field>
482 <field name="model">purchase.order.line</field>
483 <field name="arch" type="xml">
484 <search string="Search Purchase Order">
485 <field name="order_id"/>
486 <field name="product_id"/>
487 <field name="partner_id" string="Supplier" filter_domain="[('partner_id', 'child_of', self)]"/>
488 <group expand="0" string="Group By...">
489 <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
490 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
491 <filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
492 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
498 <record id="purchase_line_form_action2" model="ir.actions.act_window">
499 <field name="name">On Purchase Order Lines</field>
500 <field name="type">ir.actions.act_window</field>
501 <field name="res_model">purchase.order.line</field>
502 <field name="domain">[('order_id.invoice_method','<>','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
503 <field name="view_type">form</field>
504 <field name="view_mode">tree,form</field>
505 <field name="search_view_id" ref="purchase_order_line_search"/>
506 <field name="help" type="html">
508 Here you can track all the lines of purchase orders where the
509 invoicing is "Based on Purchase Order Lines", and for which you
510 have not received a supplier invoice yet. You can generate a
511 draft supplier invoice based on the lines from this list.
515 <record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
516 <field eval="1" name="sequence"/>
517 <field name="view_mode">tree</field>
518 <field name="view_id" ref="purchase_order_line_tree"/>
519 <field name="act_window_id" ref="purchase_line_form_action2"/>
521 <record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
522 <field eval="2" name="sequence"/>
523 <field name="view_mode">form</field>
524 <field name="view_id" ref="purchase_order_line_form2"/>
525 <field name="act_window_id" ref="purchase_line_form_action2"/>
528 action="purchase_line_form_action2"
529 id="menu_purchase_line_order_draft"
530 parent="menu_procurement_management_invoice"
533 <!-- Procurements -->
535 <record id="view_procurement_form_inherit" model="ir.ui.view">
536 <field name="name">procurement.order.form.inherit</field>
537 <field name="model">procurement.order</field>
538 <field name="inherit_id" ref="procurement.procurement_form_view"/>
539 <field name="arch" type="xml">
540 <xpath expr="//field[@name='close_move']" position="before">
541 <field name="purchase_id"/>
546 <!-- Product Suppliers-->
548 <record id="view_product_supplier_inherit" model="ir.ui.view">
549 <field name="name">product.normal.supplier.form.inherit</field>
550 <field name="model">product.product</field>
551 <field name="inherit_id" ref="product.product_normal_form_view"/>
552 <field name="arch" type="xml">
553 <div name="options" position="inside">
554 <field name="purchase_ok" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
555 <label for="purchase_ok"/>
557 <group name="procurement" position="after">
558 <separator string="Suppliers"/>
559 <field name="seller_ids" context="{'uom_id': uom_id}"/>
564 <record id="product_product_normal_form_procurement_help_view" model="ir.ui.view">
565 <field name="name">product.normal.form.procurement.help.inherit</field>
566 <field name="model">product.product</field>
567 <field name="inherit_id" ref="procurement.product_form_view_procurement_button"/>
568 <field name="arch" type="xml">
569 <group name="procurement_help" position="inside">
570 <p attrs="{'invisible': ['|','|',('type','<>','service'),('procure_method','<>','make_to_order'),('supply_method','<>','buy')]}">
571 When you sell this service to a customer, <b>a draft purchase order</b>
572 will be created in order to subcontract the job
573 <i attrs="{'invisible': [('seller_id','=',False)]}">to
574 <field name="seller_id" class="oe_inline"/></i>.
576 <p attrs="{'invisible': ['|','|',('type','=','service'),('procure_method','<>','make_to_order'),('supply_method','<>','buy')]}">
577 When you sell this product, OpenERP will trigger <b>a draft
578 purchase order</b> to buy the required quantities to the supplier.
579 The delivery order will be ready after having received the
586 <record id="product_search_form_view_purchase" model="ir.ui.view">
587 <field name="name">product.search.purchase.form</field>
588 <field name="model">product.product</field>
589 <field name="inherit_id" ref="product.product_search_form_view"/>
590 <field name="arch" type="xml">
591 <filter name="filter_to_sell" position="before">
592 <filter name="filter_to_purchase" string="To Purchase" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
594 <filter name="filter_to_sell" position="after">
595 <filter name="filter_to_purchase" string="Can be Purchased" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
600 <record id="product_template_search_view_purchase" model="ir.ui.view">
601 <field name="name">product.template.search.purchase</field>
602 <field name="model">product.template</field>
603 <field name="inherit_id" ref="product.product_template_search_view"/>
604 <field name="arch" type="xml">
605 <filter name="filter_to_sell" position="after">
606 <filter name="filter_to_purchase" string="Can be Purchased" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
611 <record id="view_template_purchase_ok_form" model="ir.ui.view">
612 <field name="name">product.template.purchase.ok.form.inherit</field>
613 <field name="model">product.template</field>
614 <field name="inherit_id" ref="product.product_template_form_view"/>
615 <field name="arch" type="xml">
616 <div name="options" position="inside">
617 <field name="purchase_ok"/>
618 <label for="purchase_ok"/>
622 <record model="ir.actions.act_window" id="action_purchase_line_product_tree">
623 <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
624 <field name="name">Purchases</field>
625 <field name="res_model">purchase.order.line</field>
626 <field name="view_id" ref="purchase_order_line_tree"/>
628 <record id="view_product_account_purchase_ok_form" model="ir.ui.view">
629 <field name="name">product.account.purchase.ok.form.inherit</field>
630 <field name="model">product.product</field>
631 <field name="inherit_id" ref="account.product_normal_form_view"/>
632 <field name="arch" type="xml">
633 <xpath expr="//div[@name='buttons']" position="inside">
634 <button class="oe_inline oe_stat_button" name="%(action_purchase_line_product_tree)d" type="action"
635 groups="purchase.group_purchase_user" icon="fa-shopping-cart">
636 <field string="Purchases" name="purchase_count" widget="statinfo" />
639 <field name="property_account_expense" position="replace" >
640 <field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" groups="account.group_account_user"/>
642 <field name='supplier_taxes_id' position="replace" >
643 <field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/>