15
15
<xpath expr="/form/notebook//page[@string='Invoicing']" position="replace">
17
<xpath expr="//field[@name='product_uom']" position="attributes">
18
<attribute name="domain">[('uom_by_product', '=', product_id)]</attribute>
20
<xpath expr="/form//field[@name='notes']" position="before">
21
<separator colspan="4" string="Information" />
22
<field name="external_ref" readonly="1" />
23
<field name="project_ref" readonly="1" />
24
<field name="fnct_project_ref" readonly="1" />
25
<separator colspan="4" string="Notes" />
28
<xpath expr="/form//group" position="before">
29
<field name="vat_ok" invisible="1" />
32
<xpath expr="/form//group" position="attributes">
33
<attribute name="attrs">{'invisible': [('vat_ok', '=', False)]}</attribute>
44
25
<field name="inherit_id" ref="purchase.purchase_order_form" />
45
26
<field name="arch" type="xml">
48
<xpath expr="/form//field[@name='name']" position="before">
49
<field name="requested_date_in_past" invisible="1" />
52
<p id="view_order_requested_in_past"
53
style="display:none; text-align:center; color:#f27d0c; font-weight:bold; font-size:1.2em">
54
WARNING: The requested date of this purchase order is in the past.
56
<script language="javascript">
57
var is_in_past = $('#requested_date_in_past').val();
58
if (is_in_past == "1") {
59
msg_dom = $('#view_order_requested_in_past');
67
28
<xpath expr="/form/group/field[@name='partner_ref']" position="attributes">
68
29
<attribute name="attrs">{'readonly': ['|', ('partner_type', 'not in', ['external', 'esc']), ('state', 'not in', ['draft', 'confirmed'])]}</attribute>
117
71
<xpath expr="/form/group/field[@name='company_id']" position="before">
118
<field name="order_type" on_change="onchange_internal_type(order_type, partner_id, categ, dest_partner_id, warehouse_id, delivery_requested_date)" />
72
<field name="order_type" on_change="onchange_internal_type(order_type, partner_id, dest_partner_id, warehouse_id)" />
119
73
<field name="priority" />
121
75
<field name="categ" />
76
<field name="loan_duration" attrs="{'invisible': [('order_type', '!=', 'loan')], 'required': [('order_type', '=', 'loan')]}" />
122
77
<field name="details" />
123
<field name="parent_order_name" readonly="True" attrs="{'invisible': [('parent_order_name', '=', False)]}" />
125
<field name="loan_duration" attrs="{'invisible': [('order_type', '!=', 'loan')], 'required': [('order_type', '=', 'loan')]}" />
127
79
<xpath expr="/form/notebook/page//field[@name='invoice_method']" position="replace">
128
80
<field name="invoice_method" attrs="{'invisible': [('order_type', 'in', ['donation_exp', 'donation_st', 'in_kind', 'loan'])]}" />
131
83
<xpath expr="/form/notebook//field[@name='dest_address_id']" position="replace">
132
84
<field name="dest_partner_id" attrs="{'invisible': [('order_type', '!=', 'direct')], 'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
133
85
on_change="on_change_dest_partner_id(dest_partner_id)" />
134
<field name="dest_address_id" domain="[('dest_address', '=', dest_partner_id)]" attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
86
<field name="dest_address_id" domain="[('partner_id', '=', dest_partner_id)]" attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
136
88
<xpath expr="/form/notebook//field[@name='fiscal_position']" position="after">
137
89
<field name="invoice_address_id"
138
domain="[('inv_address', 'in', [company_id])]"
139
context="contact_display='partner_address'"
90
domain="[('partner_id', 'in', (dest_partner_id, company_id))]"
140
91
attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
144
<xpath expr="/form/notebook//tree" position="attributes">
145
<attribute name="hide_delete_button">True</attribute>
148
95
<xpath expr="/form/notebook//tree//field[@name='price_subtotal']" position="after">
149
96
<field name="rfq_ok" invisible="1" />
150
<field name="tender_line_id" invisible="1" />
151
97
<field name="fake_state" invisible="1" />
152
98
<field name="order_state_purchase_order_line" invisible="True" />
153
99
<button string="Split line" icon="terp-stock_effects-object-colorize" name="open_split_wizard" type="object"
154
100
attrs="{'invisible': ['|', ('rfq_ok', '=', True), ('order_state_purchase_order_line', 'not in', ('draft', 'wait', 'confirmed'))]}" />
155
<button string="Delete" icon="gtk-del" type="object" name="ask_unlink" confirm="You requested to cancel a line in the PO. Do you want to proceed?"
156
attrs="{'invisible': ['|', ('tender_line_id', '!=', False), ('order_state_purchase_order_line', 'not in', ('rfq_sent', 'draft', 'wait', 'confirmed'))]}" />
159
103
<xpath expr="/form//field[@name='state']" position="after">
202
144
<group col="8" colspan="4">
203
145
<filter icon="terp-document-new" name="draft" string="Draft" domain="[('state', 'in', ['draft'])]" separator="1" help="Purchase orders which are in draft state" />
204
146
<filter icon="terp-camera_test" name="confirmed" string="Validated" domain="[('state','in',['confirmed','wait'])]" separator="1" help="Purchase orders which are in validated state." />
205
<filter icon="gtk-paste-v" name="sourced" string="Sourced" domain="[('state','=','sourced')]" separator="1" />
206
147
<filter icon="terp-check" name="confirmed_wait" string="Confirmed (waiting)" domain="[('state', 'in', ['confirmed_wait'])]" separator="1" help="Purchase orders which are in approved state." />
207
148
<filter icon="terp-check" name="approved" string="Confirmed" domain="[('state', 'in', ['approved'])]" separator="1" help="Purchase orders which are in approved state." />
208
149
<filter icon="gtk-close" name="done" string="Closed" domain="[('state', 'in', ['done'])]" separator="1" help="Purchase orders which are in done state." />
209
150
<separator orientation="vertical" />
210
<filter icon="gtk-missing-image" name="inactive" string="Show Split" domain="[('state','=','split')]" context="{'active_test': False}" separator="1" />
211
<separator orientation="vertical" />
212
151
<filter icon="gtk-cancel" name="cancelled" string="Cancelled" domain="[('state', 'in', ['cancel'])]" separator="1" help="Purchase orders which are in cancelled state." />
213
152
<separator orientation="vertical" />
214
153
<filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state', 'in', ['except_invoice', 'except_picking'])]" separator="1" help="Purchase orders which are in the exception state." />
215
154
<separator orientation="vertical" />
216
155
<field name="name" select="1" string="Reference" />
217
156
<field name="partner_id" select="1" string="Supplier" />
218
<field name="partner_ref" select="1" string="Supplier Ref." />
333
259
<field name="arch" type="xml">
335
261
<xpath expr="/form//field[@name='product_id']" position="replace">
336
<field name="tender_line_id" invisible="1" />
337
262
<field name="product_id" colspan="4"
338
context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id, available_for_restriction=parent.partner_type,search_default_not_restricted=1,categ=parent.categ"
339
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)"
340
attrs="{'readonly': [('tender_line_id', '!=', False)]}"
342
<!-- domain="[('purchase_type', '=', parent.categ)] />" -->
263
context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"
264
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)"/>
345
267
<xpath expr="/form//field[@name='price_unit']" position="replace">
415
327
<menuitem id="purchase.menu_action_stock_move_report_po" parent="stock.next_id_61" />
417
329
<!-- Invoice control -->
418
<!-- MOVED THIS BLOCK TO hidden_menu.xml === DO NOT HARD DELETE MenuItem -->
330
<delete id="purchase.menu_procurement_management_invoice" model="ir.ui.menu" />
331
<delete id="purchase.menu_procurement_management_pending_invoice" model="ir.ui.menu" />
332
<delete id="purchase.menu_purchase_line_order_draft" model="ir.ui.menu" />
335
<delete id="purchase.menu_procurement_partner_contact_form" model="ir.ui.menu" />
336
<delete id="purchase.menu_product_by_category_purchase_form" model="ir.ui.menu" />
337
<delete id="purchase.menu_procurement_management_product" model="ir.ui.menu" />
339
<!-- Picking on Purchase menu -->
340
<delete model="ir.ui.menu" id="purchase.menu_action_picking_tree4" />
341
<delete model="ir.ui.menu" id="purchase.menu_action_picking_tree_in_move" />
342
<!-- <delete model="ir.ui.menu" id="purchase.menu_procurement_management_inventory" /> -->
344
<!-- Purchase configuration menu -->
346
<delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
348
<delete model="ir.ui.menu" id="purchase.menu_purchase_uom_categ_form_action" />
349
<delete model="ir.ui.menu" id="purchase.menu_purchase_uom_form_action" />
350
<delete model="ir.ui.menu" id="purchase.menu_purchase_unit_measure_purchase" />
351
<delete model="ir.ui.menu" id="purchase.menu_product_pricelist_action_purhase" />
352
<delete model="ir.ui.menu" id="purchase.menu_product_pricelist_action2_purchase" />
353
<delete model="ir.ui.menu" id="purchase.menu_purchase_product_pricelist_type" />
354
<delete model="ir.ui.menu" id="purchase.menu_product_category_config_purchase" />
421
356
<delete model="ir.ui.menu" id="purchase.menu_purchase_config_pricelist" />
422
357
<delete model="ir.ui.menu" id="purchase.menu_product_in_config_purchase" />
423
358
used in useability_dashboard_and_menu/menu/supply_config_menu.xml
425
<!-- <delete model="ir.ui.menu" id="purchase.action_supplier_address_form" /> -->
360
<delete model="ir.ui.menu" id="purchase.action_supplier_address_form" />
427
362
<!-- Here was an act_window to display all PO from products views.
428
363
This action is defined on product_attributes module -->
430
<record id="purchase_order_line_unlink_wizard_form_view" model="ir.ui.view">
431
<field name="name">purchase.order.line.unlink.wizard.form.view</field>
432
<field name="model">purchase.order.line.unlink.wizard</field>
433
<field name="type">form</field>
434
<field name="arch" type="xml">
435
<form string="Purchase order line cancelation">
436
<field name="last_line" invisible="1" />
437
<field name="only_exp" invisible="1" />
438
<group colspan="4" col="1" attrs="{'invisible': [('only_exp', '=', True)]}">
440
<h4 style="text-align: center; margin: 10px; font-size: 1.2em">Would you re-source the needs sourced by this purchase order line ?</h4>
445
<p id="view_last_line_message"
446
style="display:none; text-align:center; color: red; font-weight: bold; font-size: 1.2em;">
447
WARNING! You are about to cancel/delete a line. This action once done cannot be changed, and it will mean all other related POs will be confirmed. Therefore if you wish to add another product to this PO you should do this BEFORE deleting this line. To add another product click "Close window" .
449
<script language="javascript">
450
var is_displayed = $('#last_line').val();
451
if (is_displayed == "1") {
452
msg_dom = $('#view_last_line_message')
459
<group colspan="4" col="6" attrs="{'invisible': [('only_exp', '=', True)]}">
460
<separator string="Actions" colspan="6" />
461
<button special="cancel" string="Close window" icon="gtk-cancel" colspan="2" />
462
<button name="just_cancel" string="No" type="object" icon="gtk-execute" colspan="2" />
463
<button name="cancel_and_resource" string="Yes" type="object" icon="gtk-execute" colspan="2" />
465
<group colspan="4" col="4" attrs="{'invisible': [('only_exp', '=', False)]}">
466
<separator string="Actions" colspan="4" />
467
<button special="cancel" string="Close window" icon="gtk-cancel" colspan="2" />
468
<button name="just_cancel" string="Confirm deletion" type="object" icon="gtk-execute" colspan="2" />
474
<record id="purchase_order_cancel_wizard_form_view" model="ir.ui.view">
475
<field name="name">purchase.order.cancel.wizard.form.view</field>
476
<field name="model">purchase.order.cancel.wizard</field>
477
<field name="type">form</field>
478
<field name="arch" type="xml">
479
<form string="Cancel Purchase Order">
480
<field name="last_lines" invisible="1" />
481
<group colspan="4" col="1">
483
<h4 style="text-align: center; margin: 10px">If you click on 'Cancel & Resource' button, all Field Order lines or Internal Request lines sourced by this Purchase Order will be re-sourced.</h4>
487
<separator string="Actions" />
488
<button name="cancel_po" string="Cancel only" type="object" icon="gtk-cancel" colspan="2" />
489
<button name="cancel_and_resource" string="Cancel & Resource" type="object" icon="gtk-cancel" colspan="2" />
494
<record id="ask_po_cancel_wizard_form_view" model="ir.ui.view">
495
<field name="name">ask.po.cancel.wizard.form.view</field>
496
<field name="model">purchase.order.cancel.wizard</field>
497
<field name="type">form</field>
498
<field name="priority" eval="99" />
499
<field name="arch" type="xml">
500
<form string="Cancel Purchase Order">
501
<group colspan="4" col="1">
503
<h4 style="text-align: center; margin: 10px">You removed all lines of this purchase order, would you cancel it ?</h4>
507
<separator string="Actions" colspan="4" />
508
<button colspan="1" type="object" icon="gtk-cancel" name="close_window" string="Close window" />
509
<button colspan="2" type="object" icon="gtk-execute" name="cancel_po" string="Cancel PO" />