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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
<?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="{'invisible': [('status', 'not in', 'approved')]}"/>
<button name="action_draft"
string="Reset to Draft"
attrs="{'invisible': [('status', '!=', 'reject')]}"
type="object"/>
<button name="action_reject"
type="object"
string="Reject"
class="btn-danger"
attrs="{'invisible': [('status', 'in', ['approved','reject','draft'])]}"/>
<button name="action_confirm_payment"
type="object"
string="Konfirmasi Pembayaran"
attrs="{'invisible': [('status', '=', 'reject')]}"/>
<button name="action_approval_check"
type="object"
string="Checking/Approval"
attrs="{'invisible': [('status', '=', 'reject')]}"/>
<button name="action_ap_only"
type="object"
string="AP Only"
attrs="{'invisible': [('status', '=', 'reject')]}"/>
<field name="status" widget="statusbar"
statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,approved"
statusbar_colors='{"reject":"red"}'
readonly="1"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<field name="is_cab_visible" invisible="1"/>
<button type="object"
name="action_view_journal_uangmuka"
class="oe_stat_button"
icon="fa-book"
attrs="{'invisible': [('is_cab_visible', '=', False)]}"
style="width: 200px;">
<field name="move_id" widget="statinfo" string="Journal Uang Muka"/>
<span class="o_stat_text">
<t t-esc="record.move_id.name"/>
</span>
</button>
</div>
<div class="oe_title">
<h1>
<field name="number" readonly="1"/>
</h1>
</div>
<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')]}"/>
<!-- <field name="move_id" readonly="1"/> -->
<hr/>
<field name="user_id" readonly="1"/>
<field name="partner_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="date_back_to_office"/>
<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" attrs="{'readonly': [('status', '=', 'approved')]}"/>
<field name="attachment_file_pdf" filename="attachment_filename"
widget="pdf_viewer"
attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('status', '=', 'approved')]}"/>
<field name="attachment_file_image" filename="attachment_filename"
widget="image"
attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('status', '=', 'approved')]}"
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"
/>
<!-- view form untuk popup CAB AP Only -->
<record id="view_down_payment_ap_only_form" model="ir.ui.view">
<field name="name">down.payment.ap.only.form</field>
<field name="model">down.payment.ap.only</field>
<field name="arch" type="xml">
<form string="Create CAB AP Only">
<group>
<field name="nominal"/>
<field name="account_id"/>
</group>
<footer>
<button name="action_create_cab" type="object" string="Create CAB" class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_down_payment_cab_ap_only" model="ir.actions.act_window">
<field name="name">Create CAB AP Only</field>
<field name="res_model">down.payment.ap.only</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_down_payment_ap_only_form"/>
<field name="target">new</field>
</record>
<record id="view_reject_reason_downpayment_form" model="ir.ui.view">
<field name="name">reject.reason.downpayment.form</field>
<field name="model">reject.reason.downpayment</field>
<field name="arch" type="xml">
<form string="Alasan Penolakan PUM">
<group>
<field name="reason_reject"/>
</group>
<footer>
<button name="confirm_reject" type="object" string="Tolak" class="btn-danger"/>
<button string="Batal" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_down_payment_reject" model="ir.actions.act_window">
<field name="name">Tolak Pengajuan PUM</field>
<field name="res_model">reject.reason.downpayment</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>
|