summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
blob: c4a06a6cfaf0133747cd577cca91339cb1685906 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?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'])]}"
                    />
                    <button name="calculate_line_no"
                            string="Line No"
                            type="object"
                            class="oe_highlight oe_edit_only"
                            attrs="{'invisible': ['|', ('state', '=', 'purchase'), ('state', '=', 'done')]}"
                    />
                </div>
                <button id="draft_confirm" position="after">
                    <button name="po_approve"
                            string="Ask Approval"
                            type="object"
                    />
                </button>
                <field name="date_order" position="before">
                    <field name="sale_order_id" attrs="{'readonly': [('state', 'not in', ['draft'])]}"/>
                    <field name="approval_status"/>
                </field>
                <field name="currency_id" position="after">
                    <field name="summary_qty_po"/>
                    <field name="count_line_product"/>
                </field>
                <field name="amount_total" position="after">
                    <field name="total_margin"/>
                    <field name="total_so_margin"/>
                    <field name="total_percent_margin"/>
                    <field name="total_so_percent_margin"/>
                </field>
                <field name="product_id" position="before">
                    <field name="line_no" attrs="{'readonly': 1}"/>
                </field>
                <field name="product_qty" position="before">
                    <field name="qty_onhand"/>
                    <field name="qty_incoming"/>
                    <field name="qty_outgoing"/>
                    <field name="qty_available"/>
                </field>
            </field>
        </record>
    </data>
    <data>
        <record id="rfq_order_tree_view_inherit" model="ir.ui.view">
            <field name="name">Purchase</field>
            <field name="model">purchase.order</field>
            <field name="inherit_id" ref="purchase.purchase_order_kpis_tree"/>
            <field name="arch" type="xml">
                <field name="create_date" position="after">
                    <field name="approval_status" />
                </field>
            </field>
        </record>
    </data>
    <data>
        <record id="purchase_order_tree_view_inherit" model="ir.ui.view">
            <field name="name">Purchase</field>
            <field name="model">purchase.order</field>
            <field name="inherit_id" ref="purchase.purchase_order_view_tree"/>
            <field name="arch" type="xml">
                <field name="invoice_status" position="after">
                    <field name="po_status" />
                </field>
            </field>
        </record>
    </data>
</odoo>