summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/approval_unreserve.xml
blob: 317b52768ff02cbc928edcc4aa0a4956bdeed6a1 (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
80
81
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="view_approval_unreserve_tree" model="ir.ui.view">
        <field name="name">approval.unreserve.tree</field>
        <field name="model">approval.unreserve</field>
        <field name="arch" type="xml">
            <tree string="Approval Unreserve">
                <field name="number"/>
                <field name="request_date"/>
                <field name="picking_id"/>
                <field name="state"/>
                <field name="user_id"/>
            </tree>
        </field>
    </record>
    
    <record id="approval_unreserve_line_tree" model="ir.ui.view">
        <field name="name">approval.unreserve.line.tree</field>
        <field name="model">approval.unreserve.line</field>
        <field name="arch" type="xml">
            <tree editable="bottom">
                <field name="move_id"/>
                <field name="product_id"/>
                <field name="dest_picking_id"/>
                <field name="sales_id"/>
                <field name="unreserve_qty"/>
            </tree>
        </field>
    </record>
    
    <record id="approval_unreserve_form" model="ir.ui.view">
        <field name="name">approval.unreserve.form</field>
        <field name="model">approval.unreserve</field>
        <field name="arch" type="xml">
            <form create="false">
                <header>
                    <button name="action_submit_for_approval" type="object" string="Submit for Approval" attrs="{'invisible': [('state', '!=', 'draft')]}"/>
                    <button name="action_approve" type="object" string="Approve" attrs="{'invisible': [('state', '!=', 'waiting_approval')]}"/>
                    <button name="action_reject" type="object" string="Reject" attrs="{'invisible': [('state', '!=', 'waiting_approval')]}"/>
                </header>
                <sheet>
                    <group>
                        <group>
                            <field name="number" readonly="1"/>
                            <field name="request_date" readonly="1"/>
                            <field name="picking_id"/>
                            <field name="user_id" readonly="1"/>
                            <field name="state" readonly="1"/>
                            <field name="approved_by" readonly="1"/>
                            <field name="reason"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Lines">
                            <field name="approval_line"/>    
                        </page>
                    </notebook>
                </sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids" widget="mail_followers"/>
                    <field name="message_ids" widget="mail_thread"/>
                </div>
            </form>
        </field>
    </record>

    <record id="approval_unreserve_action" model="ir.actions.act_window">
        <field name="name">Approval Unreserve</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">approval.unreserve</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem
        id="menu_approval_unreserve"
        name="Approval Unreserve"
        parent="sale.product_menu_catalog"
        sequence="4"
        action="approval_unreserve_action"
    />
</odoo>