summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-07-23 11:06:12 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-07-23 11:06:12 +0700
commitd02c3d5d0522e6ec5a43d1380c078f0dd5fd1275 (patch)
tree44d12ba59e29d9eea91a119abdbfbadc6447a1ed /indoteknik_custom/views
parent7e6927b4fd7bcd9981ce56f3fc24f8a1b685be0d (diff)
(andri) add reject & set to draft Pengajuan PUM
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/down_payment.xml39
1 files changed, 32 insertions, 7 deletions
diff --git a/indoteknik_custom/views/down_payment.xml b/indoteknik_custom/views/down_payment.xml
index 47e3c2be..467697a4 100644
--- a/indoteknik_custom/views/down_payment.xml
+++ b/indoteknik_custom/views/down_payment.xml
@@ -10,7 +10,7 @@
type="object"
string="Realisasi"
class="btn-primary"
- attrs="{}"/>
+ attrs="{'invisible': [('status', '=', 'reject')]}"/>
<button name="action_draft"
string="Reset to Draft"
attrs="{'invisible': [('status', '!=', 'reject')]}"
@@ -18,19 +18,20 @@
<button name="action_reject"
type="object"
string="Reject"
+ class="btn-danger"
attrs="{'invisible': [('status', 'in', ['approved','reject'])]}"/>
<button name="action_confirm_payment"
type="object"
string="Konfirmasi Pembayaran"
- attrs="{}"/>
+ attrs="{'invisible': [('status', '=', 'reject')]}"/>
<button name="action_approval_check"
type="object"
string="Checking/Approval"
- attrs="{}"/>
+ attrs="{'invisible': [('status', '=', 'reject')]}"/>
<button name="action_ap_only"
type="object"
string="AP Only"
- attrs="{}"/>
+ attrs="{'invisible': [('status', '=', 'reject')]}"/>
<field name="status" widget="statusbar"
statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,approved"
statusbar_colors='{"reject":"red"}'
@@ -80,15 +81,15 @@
</group>
<group>
- <field name="attachment_type"/>
+ <field name="attachment_type" attrs="{'readonly': [('status', '=', 'approved')]}"/>
<field name="attachment_file_pdf" filename="attachment_filename"
widget="pdf_viewer"
- attrs="{'invisible': [('attachment_type', '!=', 'pdf')]}"/>
+ attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('status', '=', 'approved')]}"/>
<field name="attachment_file_image" filename="attachment_filename"
widget="image"
- attrs="{'invisible': [('attachment_type', '!=', 'image')]}"
+ attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('status', '=', 'approved')]}"
style="max-width:250px; max-height:250px; object-fit:contain;"/>
<br/>
</group>
@@ -173,4 +174,28 @@
<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> \ No newline at end of file