summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/down_payment.xml
blob: 3c5f4f1fed0ddda64c4eed4598e6e1f5bcf12e7c (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="view_form_down_payment" model="ir.ui.view">
        <field name="name">down.payment.form</field>
        <field name="model">down.payment</field>
        <field name="arch" type="xml">
            <form string="Pengajuan Uang Muka (PUM)">
                <header>
                    <button name="action_realisasi_pum"
                        type="object"
                        string="Realisasi"
                        class="btn-primary"
                        attrs="{}"/>
                    <button name="action_draft"
                            string="Reset to Draft"
                            attrs="{'invisible': [('status', '!=', 'reject')]}"
                            type="object"/>                    
                    <button name="action_reject"
                        type="object"
                        string="Reject"
                        attrs="{'invisible': [('status', 'in', ['approved','reject'])]}"/>
                    <button name="action_confirm_payment"
                        type="object"
                        string="Konfirmasi Pembayaran"
                        attrs="{}"/>
                    <button name="action_approval_check"
                        type="object"
                        string="Checking/Approval"
                        attrs="{}"/>
                    <field name="status" widget="statusbar"
                        statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,approved"
                        statusbar_colors='{"reject":"red"}'
                        readonly="1"/>
                </header>
                <sheet>
                    <h1>
                        <field name="number" readonly="1" class="oe_title"/>
                    </h1>
                    <group col="2">
                        <group string="">
                            <field name="applicant_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                            <field name="nominal" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                            <field name="bank_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                            <field name="account_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                            <field name="bank_account" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                            <hr/>
                            <field name="user_id" readonly="1"/>
                            <field name="departement_type"/>
                            <field name="status_pay_down_payment"
                                readonly="1"
                                decoration-success="status_pay_down_payment == 'payment'"
                                decoration-danger="status_pay_down_payment == 'pending'"
                                widget="badge"/>
                            <field name="create_date" readonly="1"/>
                            <field name="estimated_return_date"  readonly="1" widget="badge"/>
                            <field name="days_remaining" readonly="1" widget="badge"/>
                            <field name="detail_note" attrs="{'readonly': [('status', '=', 'approved')]}"/>
                        </group>

                        <group>
                            <field name="attachment_type"/>

                            <field name="attachment_file_pdf" filename="attachment_filename"
                                widget="pdf_viewer"
                                attrs="{'invisible': [('attachment_type', '!=', 'pdf')]}"/>

                            <field name="attachment_file_image" filename="attachment_filename"
                                widget="image"
                                attrs="{'invisible': [('attachment_type', '!=', 'image')]}"
                                style="max-width:250px; max-height:250px; object-fit:contain;"/>
                            <br/>
                        </group>

                    </group>
                </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="view_tree_down_payment" model="ir.ui.view">
        <field name="name">down.payment.tree</field>
        <field name="model">down.payment</field>
        <field name="arch" type="xml">
            <tree>
                <field name="number"/>
                <field name="user_id" optional='hide'/>
                <field name="applicant_name"/>
                <field name="nominal"/>
                <field name="departement_type" optional='hide'/>
                <field name="days_remaining" readonly="1" widget="badge"/>
                <field name="status"
                    readonly="1"
                    decoration-success="status == 'approved'"
                    widget="badge" optional="show"/>
                <field name="status_pay_down_payment"
                    readonly="1"
                    decoration-success="status_pay_down_payment == 'payment'"
                    decoration-danger="status_pay_down_payment == 'pending'"
                    widget="badge"/>
                <field name="estimated_return_date" optional="hide" widget="badge" />
            </tree>
        </field>
    </record>
    <record id="action_down_payment" model="ir.actions.act_window">
        <field name="name">Pengajuan Uang Muka (Down Payment)</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">down.payment</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem id="menu_down_payment_acct"
        name="Pengajuan Uang Muka (Down Payment)"
        parent="account.menu_finance_entries"
        sequence="114"
        action="action_down_payment"
    />
    
    <menuitem id="menu_down_payment_sales"
        name="Pengajuan Uang Muka (Down Payment)"
        parent="sale.product_menu_catalog"
        sequence="101"
        action="action_down_payment"
    />
</odoo>