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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
    <data>

        <record id="sale_order_form_view_incoterm" model="ir.ui.view">
            <field name="name">sale.order.form.view.incoterm</field>
            <field name="model">sale.order</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="sale.view_order_form" />
            <field name="arch" type="xml">
                <xpath expr="/form//field[@name='incoterm']" position="replace">
                    <field name="intl_customer_ok" invisible="1" />
                    <field name="incoterm" attrs="{'invisible': [('intl_customer_ok', '=', False)]}" widget="selection" />
                </xpath>
            </field>
        </record>

        <!-- Add a field in SO search view to have the possibility to search on details -->
        <record id="sale_order_search_details_view" model="ir.ui.view">
            <field name="name">sale.order.search.details.view</field>
            <field name="model">sale.order</field>
            <field name="type">search</field>
            <field name="inherit_id" ref="sale.view_sales_order_filter" />
            <field name="arch" type="xml">
                <data>

                    <xpath expr="/search//field[@name='partner_id']" position="after">
                        <field name="details" />
                    </xpath>

                </data>
            </field>
        </record>

    </data>
</openerp>