1
<?xml version="1.0" encoding="utf-8" ?>
5
<menuitem name="Transport costs" id="menu_transport_cost_reports" parent="base.next_id_73" sequence="2" />
7
<record id="purchase_form_view_transport_mgmt_line" model="ir.ui.view">
8
<field name="name">purchase.form.view.transport.mgmt.line</field>
9
<field name="model">purchase.order</field>
10
<field name="type">form</field>
11
<field name="inherit_id" ref="res_currency_functional.purchase_order_form_inherit" />
12
<field name="arch" type="xml">
14
<xpath expr="/form/notebook/page/group[1]/field[@name='currency_id']" position="before">
15
<group colspan="12" col="19" attrs="{'invisible': ['|', '|', ('rfq_ok', '=', True), ('categ', '=', 'transport'), ('display_intl_transport_ok', '=', False)]}">
16
<field name="display_intl_transport_ok" invisible="1" />
17
<field name="intl_supplier_ok" invisible="1" />
18
<field name="transport_mode" attrs="{'invisible': [('display_intl_transport_ok', '=', False)],
19
'readonly': [('shipped_rate', '!=', 0.00)]
21
<label colspan="15" />
22
<field name="transport_cost" attrs="{'invisible': [('display_intl_transport_ok', '=', False)],
23
'required': [('rfq_ok', '=', False), ('intl_supplier_ok', '=', True)],
24
'readonly': [('shipped_rate', '!=', 0.00)]
26
<field name="transport_currency_id"
27
domain="[('is_po_functional', '=', pricelist_id)]"
28
attrs="{'invisible': [('display_intl_transport_ok', '=', False)], 'required': [('rfq_ok', '=', False), ('intl_supplier_ok', '=', True)],'readonly': [('shipped_rate', '!=', 0.00)]}"
30
<separator colspan="19" attrs="{'invisible': [('display_intl_transport_ok', '=', False)]}" />
34
<xpath expr="/form/notebook/page/group[1]/field[@name='functional_amount_total']" position="after">
36
<field name="total_price_include_transport" readonly="1" attrs="{'invisible': ['|', '|', ('rfq_ok', '=', True), ('categ', '=', 'transport'), ('display_intl_transport_ok', '=', False)]}" />
39
<xpath expr="/form/notebook/page/group[1]/field[@name='total_price_include_transport']" position="after">
41
<field name="func_total_price_include_transport" readonly="1" attrs="{'invisible': ['|', '|', ('rfq_ok', '=', True), ('categ', '=', 'transport'), ('display_intl_transport_ok', '=', False)]}"/>
44
<xpath expr="/form/notebook/page[@string='Purchase Order']" position="after">
45
<page string="Linked documents" attrs="{'invisible': [('categ', '!=', 'transport')]}">
46
<separator colspan="4" string="Purchase Order" />
47
<field name="transport_order_id" domain="[('rfq_ok', '=', False)]" />
49
<separator colspan="2" string="Delivery documents" />
50
<separator colspan="2" string="Shipment documents" />
51
<field name="picking_transport_ids" colspan="2" nolabel="1" widget="many2many" domain="[('transport_order_id', '=', False), ('type', '=', 'out'), ('converted_to_standard', '=', True)]">
52
<tree string="Delivery Orders">
54
<field name="reason_type_id" />
56
<field name="min_date" />
57
<field name="state" />
60
<field name="shipment_transport_ids" colspan="2" nolabel="1" widget="many2many" domain="[('transport_order_id', '=', False), ('parent_id', '!=', False)]">
61
<tree string="Shipments">
63
<field name="partner_id" />
64
<field name="num_of_packs" />
66
<field name="date_of_departure" />
67
<field name="state" />
76
<record id="purchase_form_view_transport_mgmt" model="ir.ui.view">
77
<field name="name">purchase.form.view.transport.mgmt</field>
78
<field name="model">purchase.order</field>
79
<field name="type">form</field>
80
<field name="inherit_id" ref="purchase_override.purchase_order_type_form_view" />
81
<field name="arch" type="xml">
84
<xpath expr="/form/notebook//field[@name='origin']" position="after">
85
<!-- <button name="display_transport_line" type="object" string="Display/Hide Transport line" icon="gtk-execute" colspan="2" attrs="{'invisible': ['|', '|', '|', ('rfq_ok', '=', True), ('state', 'in', ['approved', 'done']), ('categ', '=', 'transport'), ('intl_supplier_ok', '=', True)]}"/>-->
88
<xpath expr="/form//field[@name='pricelist_id']" position="replace">
89
<field domain="[('type','=','purchase')]" name="pricelist_id"
90
on_change="onchange_pricelist_id(partner_id, pricelist_id, transport_currency_id)" />
93
<xpath expr="/form//field[@name='location_id']" position="after">
94
<field name="incoterm_id" attrs="{'invisible': [('intl_supplier_ok', '=', False)], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" widget="selection" />
101
<!-- Add a 'description' field on PO search view to search on details -->
102
<record id="purchase_order_search_description_view" model="ir.ui.view">
103
<field name="name">purchase.order.search.description.view</field>
104
<field name="model">purchase.order</field>
105
<field name="type">search</field>
106
<field name="priority">100</field>
107
<field name="inherit_id" ref="purchase.view_purchase_order_filter" />
108
<field name="arch" type="xml">
111
<xpath expr="/search//field[@name='origin']" position="after">
112
<field name="details" />