summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/mrp_production.xml
blob: 5057415fea5dfe0c3338c7d5e4dbacc37ff4e328 (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
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="production_mrp_form_view_inherited" model="ir.ui.view">
        <field name="name">mrp.production.view.inherited</field>
        <field name="model">mrp.production</field>
        <field name="inherit_id" ref="mrp.mrp_production_form_view" />
        <field name="arch" type="xml">
            <button name="button_mark_done" position="after">
                <button name="create_po_from_manufacturing" type="object" string="Create PO" class="oe_highlight" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('is_po', '=', True)]}"/>
            </button>
            <field name="bom_id" position="after">
                <field name="desc"/>
                <field name="sale_order"/>
                <field name="is_po" readonly="1"/>
            </field>
            <xpath expr="//form/sheet/notebook/page/field[@name='move_raw_ids']/tree/field[@name='product_uom_qty']" position="before">
                <field name="vendor_id"/>
            </xpath>
            <xpath expr="//form/sheet/notebook/page[@name='miscellaneous']" position="after">
                <page string="Purchase Match" name="purchase_order_lines_indent">
                    <field name="production_purchase_match"/>
                </page>
                <page string="Check Product" name="check_bom_product">
                    <field name="check_bom_product_lines"/>
                </page>
            </xpath>
        </field>
    </record>

    <record id="check_bom_product_tree" model="ir.ui.view">
        <field name="name">check.bom.product.tree</field>
        <field name="model">check.bom.product</field>
        <field name="arch" type="xml">
            <tree editable="bottom" decoration-warning="status == 'Pending'" decoration-success="status == 'Done'">
                <field name="code_product"/>
                <field name="product_id"/>
                <field name="quantity"/>
                <field name="status" readonly="1"/>
            </tree>
        </field>
    </record>

    <record id="production_mrp_tree_view_inherited" model="ir.ui.view">
        <field name="name">mrp.production.view.inherited</field>
        <field name="model">mrp.production</field>
        <field name="inherit_id" ref="mrp.mrp_production_tree_view" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="desc"/>
                <field name="sale_order"/>
            </field>
            <field name="state" position="after">
                <field name="state_reserve" optional="hide"/>
                <field name="date_reserved" optional="hide"/>
            </field>
        </field>
    </record>

    <record id="production_purchase_match_tree" model="ir.ui.view">
        <field name="name">production.purchase.match.tree</field>
        <field name="model">production.purchase.match</field>
        <field name="arch" type="xml">
            <tree>
                <field name="order_id" readonly="1"/>
                <field name="vendor" readonly="1"/>
                <field name="total" readonly="1"/>
            </tree>
        </field>
    </record>
</odoo>