summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
blob: f209d18a240053545321cbe6e2f45f77caf47021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <data>
        <record id="purchase_order_form_view_inherit" model="ir.ui.view">
            <field name="name">Purchase Order</field>
            <field name="model">purchase.order</field>
            <field name="inherit_id" ref="purchase.purchase_order_form"/>
            <field name="arch" type="xml">
                <div class="oe_title" position="after">
                    <button name="sale_order_sync"
                            string="Synchronize Sale Order"
                            type="object"
                            class="oe_highlight oe_edit_only"
                            attrs="{'invisible': ['|', ('sale_order_id', '=', False), ('state', 'not in', ['draft'])]}"
                    />
                </div>
                <field name="date_order" position="before">
                    <field name="sale_order_id" attrs="{'readonly': [('state', 'not in', ['draft'])]}"/>
                </field>
            </field>
        </record>
    </data>
</odoo>