~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to transport_mgmt/purchase_view.xml

UF-385 [ADD] Added consumption_calculation module

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8" ?>
2
 
<openerp>
3
 
    <data>
4
 
 
5
 
        <menuitem name="Transport costs" id="menu_transport_cost_reports" parent="base.next_id_73" sequence="2" />
6
 
 
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">
13
 
                <data>
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)]
20
 
                                                                }"/>
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)]
25
 
                                                                }" nolabel="1" />
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)]}" 
29
 
                                nolabel="1" />
30
 
                            <separator colspan="19" attrs="{'invisible': [('display_intl_transport_ok', '=', False)]}" />
31
 
                        </group>
32
 
                    </xpath>
33
 
 
34
 
                    <xpath expr="/form/notebook/page/group[1]/field[@name='functional_amount_total']" position="after">
35
 
                        <newline />
36
 
                        <field name="total_price_include_transport" readonly="1" attrs="{'invisible': ['|', '|', ('rfq_ok', '=', True), ('categ', '=', 'transport'), ('display_intl_transport_ok', '=', False)]}" />
37
 
                    </xpath>
38
 
 
39
 
                    <xpath expr="/form/notebook/page/group[1]/field[@name='total_price_include_transport']" position="after">
40
 
                        <newline />
41
 
                        <field name="func_total_price_include_transport" readonly="1" attrs="{'invisible': ['|', '|', ('rfq_ok', '=', True), ('categ', '=', 'transport'), ('display_intl_transport_ok', '=', False)]}"/>
42
 
                    </xpath>
43
 
 
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)]" />
48
 
                            <newline />
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">
53
 
                                    <field name="name" />
54
 
                                    <field name="reason_type_id" />
55
 
                                    <field name="date" />
56
 
                                    <field name="min_date" />
57
 
                                    <field name="state" />
58
 
                                </tree>
59
 
                            </field>
60
 
                            <field name="shipment_transport_ids" colspan="2" nolabel="1" widget="many2many" domain="[('transport_order_id', '=', False), ('parent_id', '!=', False)]">
61
 
                                <tree string="Shipments">
62
 
                                    <field name="name" />
63
 
                                    <field name="partner_id" />
64
 
                                    <field name="num_of_packs" />
65
 
                                    <field name="date" />
66
 
                                    <field name="date_of_departure" />
67
 
                                    <field name="state" />
68
 
                                </tree>
69
 
                            </field>
70
 
                        </page>
71
 
                    </xpath>
72
 
                </data>
73
 
            </field>
74
 
        </record>
75
 
 
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">
82
 
                <data>
83
 
 
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)]}"/>-->
86
 
                    </xpath>
87
 
 
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)" />
91
 
                    </xpath>
92
 
 
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" />
95
 
                    </xpath>
96
 
 
97
 
                </data>
98
 
            </field>
99
 
        </record>
100
 
 
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">
109
 
                <data>
110
 
 
111
 
                    <xpath expr="/search//field[@name='origin']" position="after">
112
 
                        <field name="details" />
113
 
                    </xpath>
114
 
 
115
 
                </data>
116
 
            </field>
117
 
        </record>
118
 
 
119
 
    </data>
120
 
</openerp>