summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/advance_payment_request.py4
-rw-r--r--indoteknik_custom/views/advance_payment_request.xml36
2 files changed, 25 insertions, 15 deletions
diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py
index ccbf8988..01c60cb4 100644
--- a/indoteknik_custom/models/advance_payment_request.py
+++ b/indoteknik_custom/models/advance_payment_request.py
@@ -116,6 +116,10 @@ class AdvancePaymentRequest(models.Model):
default=lambda self: self.env.company.currency_id
)
+ type_request = fields.Selection([
+ ('pum', 'PUM'),
+ ('reimburse', 'Reimburse')], string='Tipe Pengajuan', default='pum', tracking=3)
+
@api.onchange('nominal')
def _onchange_nominal_no_minus(self):
if self.nominal and self.nominal < 0:
diff --git a/indoteknik_custom/views/advance_payment_request.xml b/indoteknik_custom/views/advance_payment_request.xml
index 1610293f..20f43961 100644
--- a/indoteknik_custom/views/advance_payment_request.xml
+++ b/indoteknik_custom/views/advance_payment_request.xml
@@ -62,15 +62,18 @@
</div>
<group col="2">
<group string="">
+ <field name="type_request" attrs="{'readonly': [('status', '=', 'approved')]}"/>
<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="detail_note" attrs="{'readonly': [('status', '=', 'approved')]}"/>
- <hr/>
+ </group>
+
+ <group>
<field name="user_id" readonly="1"/>
- <field name="partner_id" readonly="1"/>
+ <!-- <field name="partner_id" readonly="1"/> -->
<field name="departement_type"/>
<field name="status_pay_down_payment"
readonly="1"
@@ -85,20 +88,23 @@
<field name="reason_reject" attrs="{'invisible': [('status', '!=', 'reject')], 'readonly': True}"/>
</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>
+ <notebook>
+ <page string="Attachment">
+ <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/>
+ </page>
+ <page string="Reimburse" attrs="{'invisible': [('type_request', '!=', 'reimburse')]}">
+ <h1>Hello World HEHE</h1>
+ </page>
+ </notebook>
</group>
</sheet>
<div class="oe_chatter">