51
53
<field name="invoice_method"/>
52
54
<field name="fiscal_position" widget="selection"/>
54
<separator string="Invoices" colspan="4"/>
56
<field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
56
<separator string="Invoices" colspan="4"/>
58
<field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
61
<xpath expr="/form//field[@name='warehouse_id']" position="replace">
62
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id,order_type,dest_address_id)" widget="selection"/>
62
<xpath expr="/form//field[@name='warehouse_id']" position="replace">
63
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id,order_type,dest_address_id)" widget="selection"/>
65
66
<xpath expr="/form/notebook/page[@string='Purchase Order']/field[@name='partner_id']" position="replace">
66
67
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" domain="[('id', '!=', company_id)]" />
68
<field name="allocation_setup" invisible="1" />
69
71
<xpath expr="/form/group/field[@name='company_id']" position="before">
70
72
<field name="order_type" on_change="onchange_internal_type(order_type, partner_id, dest_partner_id, warehouse_id)" />
71
73
<field name="priority" />
77
79
<xpath expr="/form/notebook/page//field[@name='invoice_method']" position="replace">
78
80
<field name="invoice_method" attrs="{'invisible': [('order_type', 'in', ['donation_exp', 'donation_st', 'in_kind', 'loan'])]}" />
81
<field name="unallocation_ok" attrs="{'readonly': ['|', ('cross_docking_ok', '=', True), ('allocation_setup', '!=', 'mixed')]}" />
80
83
<xpath expr="/form/notebook//field[@name='dest_address_id']" position="replace">
81
84
<field name="dest_partner_id" attrs="{'invisible': [('order_type', '!=', 'direct')], 'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
82
on_change="on_change_dest_partner_id(dest_partner_id)" />
85
on_change="on_change_dest_partner_id(dest_partner_id)" />
83
86
<field name="dest_address_id" domain="[('partner_id', '=', dest_partner_id)]" attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
85
88
<xpath expr="/form/notebook//field[@name='fiscal_position']" position="after">
86
<field name="invoice_address_id" domain="[('partner_id', 'in', (dest_partner_id, company_id))]"
87
attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
89
<field name="invoice_address_id"
90
domain="[('partner_id', 'in', (dest_partner_id, company_id))]"
91
attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
90
95
<xpath expr="/form/notebook//tree//field[@name='price_subtotal']" position="after">
94
99
<button string="Split line" icon="terp-stock_effects-object-colorize" name="open_split_wizard" type="object"
95
100
attrs="{'invisible': ['|', ('rfq_ok', '=', True), ('order_state_purchase_order_line', 'not in', ('draft', 'wait', 'confirmed'))]}" />
98
103
<xpath expr="/form//field[@name='state']" position="after">
99
<button name="dpo_received" string="Validate the reception" icon="terp-camera_test"
100
attrs="{'invisible': ['|', ('state', '!=', 'approved'), ('order_type', '!=', 'direct')]}" />
104
<button name="dpo_received"
105
string="Validate the reception"
106
icon="terp-camera_test"
107
attrs="{'invisible': ['|', ('state', '!=', 'approved'), ('order_type', '!=', 'direct')]}"
247
256
<field name="type">form</field>
248
257
<field name="inherit_id" ref="purchase.purchase_order_line_form" />
249
258
<field name="arch" type="xml">
251
<xpath expr="/form//field[@name='product_id']" position="replace">
252
<field name="product_id" colspan="4"
253
context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"
254
on_change="product_id_on_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,parent.state,old_price_unit,nomen_manda_0,comment,context)"/>
257
<xpath expr="/form//field[@name='price_unit']" position="replace">
258
<field name="rfq_ok" invisible="1" />
259
<field name="state" invisible="1" />
260
<field name="fake_id" invisible="1" />
261
<field name="change_price_ok" invisible="1" />
262
<field name="old_price_unit" invisible="1" />
263
<field name="price_unit"
264
on_change="price_unit_change(fake_id, price_unit, product_id, product_uom, product_qty, parent.pricelist_id, parent.partner_id, parent.date_order, change_price_ok, parent.state, old_price_unit, nomen_manda_0, comment, context)" />
260
<xpath expr="/form//field[@name='product_id']" position="replace">
261
<field name="product_id" colspan="4"
262
context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"
263
on_change="product_id_on_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,parent.state,old_price_unit,nomen_manda_0,comment,context)"/>
266
<xpath expr="/form//field[@name='price_unit']" position="replace">
267
<field name="rfq_ok" invisible="1" />
268
<field name="state" invisible="1" />
269
<field name="fake_id" invisible="1" />
270
<field name="change_price_ok" invisible="1" />
271
<field name="old_price_unit" invisible="1" />
272
<field name="price_unit"
273
on_change="price_unit_change(fake_id, price_unit, product_id, product_uom, product_qty, parent.pricelist_id, parent.partner_id, parent.date_order, change_price_ok, parent.state, old_price_unit, nomen_manda_0, comment, context)" />
270
280
<record id="purchase_order_confirm_wizard" model="ir.ui.view">
271
<field name="name">purchase.order.confirm.wizard</field>
272
<field name="model">purchase.order.confirm.wizard</field>
273
<field name="type">form</field>
274
<field name="arch" type="xml">
275
<form string="Warning on confirmation">
276
<separator colspan="4" string="Purchase Order" />
277
<field name="order_id" colspan="4" />
278
<separator colspan="4" string="Warning" />
279
<field name="errors" colspan="4" nolabel="1" />
280
<separator colspan="4" string="Actions" />
281
<button special="cancel" icon="gtk-cancel" string="Close window" colspan="1" />
282
<button type="object" name="validate_order" icon="terp-check" string="Confirm" colspan="3" />
281
<field name="name">purchase.order.confirm.wizard</field>
282
<field name="model">purchase.order.confirm.wizard</field>
283
<field name="type">form</field>
284
<field name="arch" type="xml">
285
<form string="Warning on confirmation">
286
<separator colspan="4" string="Purchase Order" />
287
<field name="order_id" colspan="4" />
288
<separator colspan="4" string="Warning" />
289
<field name="errors" colspan="4" nolabel="1" />
290
<separator colspan="4" string="Actions" />
291
<button special="cancel" icon="gtk-cancel" string="Close window" colspan="1" />
292
<button type="object" name="validate_order" icon="terp-check" string="Confirm" colspan="3" />
287
<menuitem id="purchase.menu_action_stock_move_report_po" parent="stock.next_id_61" />
289
<!-- Invoice control -->
297
<menuitem id="purchase.menu_action_stock_move_report_po" parent="stock.next_id_61" />
299
<!-- Invoice control -->
290
300
<delete id="purchase.menu_procurement_management_invoice" model="ir.ui.menu" />
291
301
<delete id="purchase.menu_procurement_management_pending_invoice" model="ir.ui.menu" />
292
302
<delete id="purchase.menu_purchase_line_order_draft" model="ir.ui.menu" />
295
305
<delete id="purchase.menu_procurement_partner_contact_form" model="ir.ui.menu" />
296
306
<delete id="purchase.menu_product_by_category_purchase_form" model="ir.ui.menu" />
297
307
<delete id="purchase.menu_procurement_management_product" model="ir.ui.menu" />
299
309
<!-- Picking on Purchase menu -->
300
310
<delete model="ir.ui.menu" id="purchase.menu_action_picking_tree4" />
301
311
<delete model="ir.ui.menu" id="purchase.menu_action_picking_tree_in_move" />
302
<delete model="ir.ui.menu" id="purchase.menu_procurement_management_inventory" />
312
<!-- <delete model="ir.ui.menu" id="purchase.menu_procurement_management_inventory" /> -->
304
314
<!-- Purchase configuration menu -->
305
<delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
306
<delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
307
<delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
316
<delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
308
318
<delete model="ir.ui.menu" id="purchase.menu_purchase_uom_categ_form_action" />
309
319
<delete model="ir.ui.menu" id="purchase.menu_purchase_uom_form_action" />
310
320
<delete model="ir.ui.menu" id="purchase.menu_purchase_unit_measure_purchase" />