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_receipt_picking_move" id="menu_action_picking_tree_in_move"
91
parent="menu_procurement_management_inventory" sequence="11"/>
93
<!--Invoice control-->
94
<menuitem id="menu_procurement_management_invoice" name="Invoice Control"
95
parent="base.menu_purchase_root" sequence="6"/>
97
<record id="action_invoice_pending" model="ir.actions.act_window">
98
<field name="name">On Draft Invoices</field>
99
<field name="res_model">account.invoice</field>
100
<field name="view_type">form</field>
101
<field name="view_mode">tree,form,calendar,graph</field>
102
<field eval="False" name="view_id"/>
103
<field name="domain">[('type','=','in_invoice')]</field>
104
<field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase', 'search_default_draft': 1}</field>
105
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
106
<field name="help" type="html">
107
<p class="oe_view_nocontent_create">
108
Click to create a draft invoice.
110
Use this menu to control the invoices to be received from your
111
supplier. Odoo generates draft invoices from your purchase
112
orders or receipts, according to your settings.
114
Once you receive a supplier invoice, you can match it with the
115
draft invoice and validate it.
121
<record id="product_normal_action_puchased" model="ir.actions.act_window">
122
<field name="name">Products</field>
123
<field name="type">ir.actions.act_window</field>
124
<field name="res_model">product.template</field>
125
<field name="view_type">form</field>
126
<field name="view_mode">kanban,tree,form</field>
127
<field name="context">{"search_default_filter_to_purchase":1}</field>
128
<field name="help" type="html">
129
<p class="oe_view_nocontent_create">
130
Click to define a new product.
132
You must define a product for everything you purchase, whether
133
it's a physical product, a consumable or services you buy to
136
The product form contains detailed information to improve the
137
purchase process: prices, procurement logistics, accounting data,
138
available suppliers, etc.
145
id="menu_procurement_management_pending_invoice"
146
action="action_invoice_pending"
147
parent="menu_procurement_management_invoice"
151
<menuitem id="menu_procurement_management_product" name="Products"
152
parent="base.menu_purchase_root" sequence="8"/>
154
<menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
155
parent="menu_procurement_management_product" sequence="10"/>
157
<menuitem name="Products" id="menu_procurement_partner_contact_form" action="product_normal_action_puchased"
158
parent="menu_procurement_management_product"/>
160
<record model="ir.ui.view" id="purchase_order_calendar">
161
<field name="name">purchase.order.calendar</field>
162
<field name="model">purchase.order</field>
163
<field name="priority" eval="2"/>
164
<field name="arch" type="xml">
165
<calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
167
<field name="amount_total"/>
168
<field name="partner_id"/>
172
<record model="ir.ui.view" id="purchase_order_graph">
173
<field name="name">purchase.order.graph</field>
174
<field name="model">purchase.order</field>
175
<field name="arch" type="xml">
176
<graph string="Purchase Order" type="bar">
177
<field name="partner_id"/>
178
<field name="amount_total" operator="+"/>
183
<record id="purchase_order_form" model="ir.ui.view">
184
<field name="name">purchase.order.form</field>
185
<field name="model">purchase.order</field>
186
<field name="arch" type="xml">
187
<form string="Purchase Order">
189
<button name="bid_received" states="sent" string="Bid Received" class="oe_highlight"/>
190
<button name="wkf_send_rfq" states="draft" string="Send RFQ by Email" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
191
<button name="wkf_send_rfq" states="sent" string="Re-Send RFQ by Email" type="object" context="{'send_rfq':True}"/>
192
<button name="print_quotation" string="Print RFQ" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
193
<button name="print_quotation" string="Re-Print RFQ" type="object" states="sent" groups="base.group_user"/>
194
<button name="purchase_confirm" states="draft" string="Confirm Order" id="draft_confirm"/>
195
<button name="purchase_confirm" states="bid" string="Confirm Order" class="oe_highlight" id="bid_confirm"/>
196
<button name="picking_ok" states="except_picking" string="Manually Corrected"/>
197
<button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
198
<button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
199
<button name="wkf_send_rfq" states="approved" string="Send PO by Email" type="object" context="{'send_rfq':False}"/>
200
<button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
201
<button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','in', ['picking', 'manual']), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
202
<button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" />
203
<button name="purchase_cancel" states="draft,confirmed,sent,bid" string="Cancel"/>
204
<button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel" type="object" />
205
<field name="state" widget="statusbar" statusbar_visible="draft,sent,bid,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
208
<div class="oe_title">
210
<label string="Request for Quotation " attrs="{'invisible': [('state','not in',('draft','sent','bid'))]}"/>
211
<label string="Purchase Order " attrs="{'invisible': [('state','in',('draft','sent','bid'))]}"/>
212
<field name="name" class="oe_inline" readonly="1"/>
217
<field name="partner_id" on_change="onchange_partner_id(partner_id, context)" context="{'search_default_supplier':1, 'default_supplier':1, 'default_customer':0}" domain="[('supplier','=',True)]"/>
218
<field name="partner_ref"/>
219
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
220
<field name="currency_id" groups="base.group_multi_currency"/>
221
<field name="journal_id" invisible='1'/>
224
<field name="date_order"/>
225
<field name="origin" attrs="{'invisible': [('origin','=',False)]}"/>
226
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
227
<field name="picking_type_id" on_change="onchange_picking_type_id(picking_type_id, context)" domain="[('code','=','incoming')]" widget="selection" context="{'special_shortened_wh_name': True}" groups="stock.group_locations"/>
228
<field name="related_location_id" invisible="1"/>
229
<field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id, context)"
230
attrs="{'invisible':['|', ('picking_type_id','=',False), ('related_location_id','!=', False)],
231
'required': [('picking_type_id','!=',False), ('related_location_id','=', False)]}"
232
groups="stock.group_locations"/>
236
<page string="Products">
237
<field name="order_line">
238
<tree string="Purchase Order Lines" editable="bottom">
239
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>
241
<field name="date_planned"/>
242
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
243
<field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('type','not in',('view','template'))]"/>
244
<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,parent.state,context)"/>
245
<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,parent.state,context)"/>
246
<field name="price_unit"/>
247
<field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
248
<field name="price_subtotal"/>
249
<field name="state" invisible="1"/>
252
<group class="oe_subtotal_footer oe_right">
253
<field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
254
<field name="amount_tax" widget="monetary" options="{'currency_field': 'currency_id'}"/>
255
<div class="oe_subtotal_footer_separator oe_inline">
256
<label for="amount_total"/>
257
<button name="button_dummy"
258
states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
260
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
262
<div class="oe_clear"/>
263
<field name="notes" class="oe_inline" placeholder="Terms and conditions..."/>
265
<page string="RFQ & Bid">
267
<field name="payment_term_id" widget="selection"/>
268
<field name="incoterm_id"/>
269
<field name="bid_date"/>
270
<field name="bid_validity"/>
273
<page string="Deliveries & Invoices">
276
<field name="minimum_planned_date"/>
277
<field name="location_id" groups="stock.group_locations"/>
278
<field name="shipped" groups="base.group_no_one"/>
281
<field name="invoice_method"/>
282
<field name="invoiced"/>
283
<field name="payment_term_id" widget="selection"/>
284
<field name="fiscal_position" attrs="{'readonly': [('invoiced','=', True)]}" />
285
<!-- We do not need these fields anymore, the information is in open chatter -->
286
<field name="validator" groups="base.group_no_one"/>
287
<field name="date_approve" groups="base.group_no_one"/>
293
<div class="oe_chatter">
294
<field name="message_follower_ids" widget="mail_followers"/>
295
<field name="message_ids" widget="mail_thread"/>
301
<record id="view_request_for_quotation_filter" model="ir.ui.view">
302
<field name="name">request.quotation.select</field>
303
<field name="model">purchase.order</field>
304
<field name="arch" type="xml">
305
<search string="Search Purchase Order">
306
<field name="name" string="Reference"/>
307
<field name="partner_id" operator="child_of"/>
308
<field name="product_id"/>
309
<field name="create_uid"/>
310
<filter name="draft" string="Quotations" domain="[('state','=','draft')]"/>
311
<filter name="approved" string="Approved" domain="[('state','in',('approved','done'))]"/>
312
<filter name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]"/>
314
<filter name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]" help="Purchase orders that include lines not invoiced."/>
315
<group expand="0" string="Group By">
316
<filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
317
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
318
<filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
324
<record id="view_purchase_order_filter" model="ir.ui.view">
325
<field name="name">purchase.order.list.select</field>
326
<field name="model">purchase.order</field>
327
<field name="arch" type="xml">
328
<search string="Search Purchase Order">
329
<field name="name" string="Reference"/>
330
<field name="partner_id" operator="child_of"/>
331
<field name="product_id"/>
332
<field name="create_uid"/>
333
<filter name="draft" string="Quotations" domain="[('state','in',('draft','sent'))]"/>
334
<filter name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]"/>
335
<filter name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]"/>
337
<filter name="not_invoiced" string="Not Invoiced" domain="[('invoice_ids','=', False)]"/>
339
<filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
340
<group expand="0" string="Group By">
341
<filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
342
<filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
343
<filter string="Expected Month" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
349
<record id="purchase_order_tree" model="ir.ui.view">
350
<field name="name">purchase.order.tree</field>
351
<field name="model">purchase.order</field>
352
<field name="arch" type="xml">
353
<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">
354
<field name="message_unread" invisible="1"/>
355
<field name="name" string="Reference"/>
356
<field name="date_order" />
357
<field name="partner_id"/>
358
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
359
<field name="minimum_planned_date" invisible="context.get('quotation_only', False)"/>
360
<field name="origin"/>
361
<field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed"/>
362
<field name="amount_total" sum="Total amount"/>
363
<field name="state"/>
368
<record id="purchase_rfq" model="ir.actions.act_window">
369
<field name="name">Requests for Quotation</field>
370
<field name="type">ir.actions.act_window</field>
371
<field name="res_model">purchase.order</field>
372
<field name="context">{}</field>
373
<field name="domain">[('state','in',('draft','sent','bid','cancel', 'confirmed'))]</field>
374
<field name="view_mode">tree,form,graph,calendar</field>
375
<field name="search_view_id" ref="view_purchase_order_filter"/>
376
<field name="help" type="html">
377
<p class="oe_view_nocontent_create">
378
Click to create a request for quotation.
380
The quotation contains the history of the discussion/negociation
381
you had with your supplier. Once confirmed, a request for
382
quotation is converted into a purchase order.
384
Most propositions of purchase orders are created automatically
385
by Odoo based on inventory needs.
389
<menuitem action="purchase_rfq" id="menu_purchase_rfq"
390
parent="menu_procurement_management"
393
<record id="purchase_form_action" model="ir.actions.act_window">
394
<field name="name">Purchase Orders</field>
395
<field name="type">ir.actions.act_window</field>
396
<field name="res_model">purchase.order</field>
397
<field name="view_mode">tree,form,graph,calendar</field>
398
<field name="context">{}</field>
399
<field name="domain">[('state','not in',('draft','sent','bid', 'confirmed'))]</field>
400
<field name="search_view_id" ref="view_purchase_order_filter"/>
401
<field name="help" type="html">
402
<p class="oe_view_nocontent_create">
403
Click to create a quotation that will be converted into a purchase order.
405
Use this menu to search within your purchase orders by
406
references, supplier, products, etc. For each purchase order,
407
you can track the related discussion with the supplier, control
408
the products received and control the supplier invoices.
412
<menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
414
<record id="purchase_order_line_form" model="ir.ui.view">
415
<field name="name">purchase.order.line.form</field>
416
<field name="model">purchase.order.line</field>
417
<field name="arch" type="xml">
418
<form string="Purchase Order Line">
422
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,'draft',context)"/>
423
<label for="product_qty"/>
425
<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,'draft',context)" class="oe_inline"/>
426
<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,'draft',context)" class="oe_inline"/>
428
<field name="price_unit"/>
431
<field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
432
<field name="date_planned" widget="date"/>
433
<field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
434
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
438
<page string="Notes">
440
</page><page string="Invoices and Incoming Shipments">
441
<field name="invoice_lines"/>
442
<field name="move_ids"/>
450
<record id="purchase_order_line_tree" model="ir.ui.view">
451
<field name="name">purchase.order.line.tree</field>
452
<field name="model">purchase.order.line</field>
453
<field name="arch" type="xml">
454
<tree string="Purchase Order Lines" create="false">
455
<field name="order_id"/>
457
<field name="partner_id" string="Supplier" />
458
<field name="product_id"/>
459
<field name="price_unit"/>
460
<field name="product_qty"/>
461
<field name="product_uom" groups="product.group_uom"/>
462
<field name="price_subtotal"/>
463
<field name="date_planned" widget="date" width="135"/>
464
<field name="state" invisible="1"/>
465
<field name="invoiced" invisible="1"/>
470
<record id="purchase_order_line_form2" model="ir.ui.view">
471
<field name="name">purchase.order.line.form2</field>
472
<field name="model">purchase.order.line</field>
473
<field name="priority" eval="20"/>
474
<field name="arch" type="xml">
475
<form string="Purchase Order Line" create="false">
477
<label for="order_id" class="oe_edit_only"/>
479
<field name="order_id" class="oe_inline" domain="[('invoice_method','=','manual')]" />
480
<label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
481
<field name="date_order" class="oe_inline"/>
483
<label for="partner_id" class="oe_edit_only"/>
484
<h2><field name="partner_id"/></h2>
487
<field name="product_id" readonly="1"/>
488
<label for="product_qty"/>
490
<field name="product_qty" readonly="1" class="oe_inline"/>
491
<field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
493
<field name="price_unit"/>
496
<field name="taxes_id" widget="many2many_tags"
497
domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
498
<field name="date_planned" widget="date" readonly="1"/>
499
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
500
<field name="account_analytic_id" colspan="4" groups="purchase.group_analytic_accounting"/>
501
<field name="invoiced"/>
505
<separator string="Manual Invoices"/>
506
<field name="invoice_lines"/>
507
<separator string="Stock Moves"/>
508
<field name="move_ids"/>
513
<record id="purchase_order_line_search" model="ir.ui.view">
514
<field name="name">purchase.order.line.search</field>
515
<field name="model">purchase.order.line</field>
516
<field name="arch" type="xml">
517
<search string="Search Purchase Order">
518
<field name="order_id"/>
519
<field name="product_id"/>
520
<field name="partner_id" string="Supplier" filter_domain="[('partner_id', 'child_of', self)]"/>
521
<filter name="hide_cancelled" string="Hide cancelled lines" domain="[('state', '!=', 'cancel')]"/>
522
<group expand="0" string="Group By">
523
<filter name="groupby_supplier" string="Supplier" icon="terp-partner" domain="[]" context="{'group_by' : 'partner_id'}" />
524
<filter name="groupby_product" string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by' : 'product_id'}" />
525
<filter icon="terp-gtk-jump-to-rtl" string="Order Reference" domain="[]" context="{'group_by' :'order_id'}"/>
526
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
532
<record id="purchase_line_form_action2" model="ir.actions.act_window">
533
<field name="name">On Purchase Order Lines</field>
534
<field name="type">ir.actions.act_window</field>
535
<field name="res_model">purchase.order.line</field>
536
<field name="domain">[('order_id.invoice_method','<>','picking'), ('state','in',('confirmed','done')), ('invoiced', '=', False)]</field>
537
<field name="view_type">form</field>
538
<field name="view_mode">tree,form</field>
539
<field name="search_view_id" ref="purchase_order_line_search"/>
540
<field name="help" type="html">
542
Here you can track all the lines of purchase orders where the
543
invoicing is "Based on Purchase Order Lines", and for which you
544
have not received a supplier invoice yet. You can generate a
545
draft supplier invoice based on the lines from this list.
550
<record id="purchase_line_form_action_tree2" model="ir.actions.act_window.view">
551
<field eval="1" name="sequence"/>
552
<field name="view_mode">tree</field>
553
<field name="view_id" ref="purchase_order_line_tree"/>
554
<field name="act_window_id" ref="purchase_line_form_action2"/>
556
<record id="purchase_line_form_action_form2" model="ir.actions.act_window.view">
557
<field eval="2" name="sequence"/>
558
<field name="view_mode">form</field>
559
<field name="view_id" ref="purchase_order_line_form2"/>
560
<field name="act_window_id" ref="purchase_line_form_action2"/>
563
action="purchase_line_form_action2"
564
id="menu_purchase_line_order_draft"
565
parent="menu_procurement_management_invoice"
568
<!-- Procurements -->
570
<record id="view_procurement_form_inherit" model="ir.ui.view">
571
<field name="name">procurement.order.form.inherit</field>
572
<field name="model">procurement.order</field>
573
<field name="inherit_id" ref="procurement.procurement_form_view"/>
574
<field name="arch" type="xml">
575
<xpath expr="//field[@name='origin']" position="after">
576
<field name="purchase_id"/>
581
<!-- Product Suppliers-->
583
<record id="view_product_supplier_inherit" model="ir.ui.view">
584
<field name="name">product.template.supplier.form.inherit</field>
585
<field name="model">product.template</field>
586
<field name="inherit_id" ref="product.product_template_form_view"/>
587
<field name="arch" type="xml">
588
<div name="options" position="inside">
590
<field name="purchase_ok"/>
591
<label for="purchase_ok"/>
597
<record id="product_template_search_view_purchase" model="ir.ui.view">
598
<field name="name">product.template.search.purchase.form</field>
599
<field name="model">product.template</field>
600
<field name="inherit_id" ref="product.product_template_search_view"/>
601
<field name="arch" type="xml">
602
<filter name="filter_to_sell" position="before">
603
<filter name="filter_to_purchase" string="To Purchase" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
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 model="ir.actions.act_window" id="action_purchase_line_product_tree">
612
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
613
<field name="name">Purchases</field>
614
<field name="res_model">purchase.order.line</field>
615
<field name="view_id" ref="purchase_order_line_tree"/>
618
<record id="view_product_account_purchase_ok_form" model="ir.ui.view">
619
<field name="name">product.template.account.purchase.ok.form.inherit</field>
620
<field name="model">product.template</field>
621
<field name="inherit_id" ref="account.product_template_form_view"/>
622
<field name="arch" type="xml">
623
<field name="property_account_expense" position="replace" >
624
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" groups="account.group_account_user"/>
626
<field name='supplier_taxes_id' position="replace" >
627
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
632
<record id="view_product_template_purchase_buttons_from" model="ir.ui.view">
633
<field name="name">product.template.purchase.button.inherit</field>
634
<field name="model">product.template</field>
635
<field name="inherit_id" ref="product.product_template_only_form_view"/>
636
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
637
<field name="arch" type="xml">
638
<xpath expr="//div[@name='buttons']" position="inside">
639
<button class="oe_inline oe_stat_button" name="action_view_purchases" type="object"
640
icon="fa-shopping-cart">
641
<field string="Purchases" name="purchase_count" widget="statinfo"/>
647
<record id="view_product_normal_purchase_buttons_from" model="ir.ui.view">
648
<field name="name">product.product.purchase.button.inherit</field>
649
<field name="model">product.product</field>
650
<field name="inherit_id" ref="product.product_normal_form_view"/>
651
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
652
<field name="arch" type="xml">
653
<xpath expr="//div[@name='buttons']" position="inside">
654
<button class="oe_inline oe_stat_button" name="%(action_purchase_line_product_tree)d" type="action"
655
icon="fa-shopping-cart">
656
<field string="Purchases" name="purchase_count" widget="statinfo"/>