summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/approval_date_doc.xml
blob: a3aae3b45c4f59c839c9a60686546a8d1b1f7ccf (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
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="approval_date_doc_tree" model="ir.ui.view">
        <field name="name">approval.date.doc.tree</field>
        <field name="model">approval.date.doc</field>
        <field name="arch" type="xml">
            <tree>
                <field name="number"/>
                <field name="picking_id"/>
                <field name="partner_id"/>
                <field name="sale_id"/>
                <field name="driver_departure_date"/>
                <field name="state"/>
                <field name="approve_date"/>
                <field name="approve_by"/>
                <field name="create_uid"/>
                <field name="create_date"/>
            </tree>
        </field>
    </record>

    <record id="approval_date_doc_form" model="ir.ui.view">
        <field name="name">approval.date.doc.form</field>
        <field name="model">approval.date.doc</field>
        <field name="arch" type="xml">
            <form>
                <header>
                    <button name="button_approve"
                    string="Approve"
                    type="object"
                    attrs="{'invisible': [('state', '=', 'done')]}"
                />
                    <button name="button_cancel"
                    string="Cancel"
                    type="object"
                    attrs="{'invisible': [('state', '=', 'cancel')]}"
                />
                </header>
                <sheet string="Approval Date Doc">
                    <group>
                        <group>
                            <field name="number"/>
                            <field name="picking_id"/>
                            <field name="partner_id"/>
                            <field name="sale_id"/>
                            <field name="driver_departure_date"/>
                            <field name="approve_date"/>
                            <field name="approve_by"/>
                            <field name="create_uid"/>
                            <field name="create_date"/>
                            <field name="note" attrs="{'invisible': [('state', '!=', 'cancel')]}"/>
                            <field name="state" readonly="1"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="approval_date_doc_action" model="ir.actions.act_window">
        <field name="name">Approval Date Doc</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">approval.date.doc</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem id="menu_approval_date_doc" name="Approval Date Doc"
        parent="account.menu_finance_receivables"
        action="approval_date_doc_action" 
        sequence="100"
    />

</odoo>