From e7264cf6995755f3a55e0d1eb9059354a56c552f Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Fri, 24 Oct 2025 10:11:01 +0700 Subject: (andri) fix --- indoteknik_custom/models/advance_payment_request.py | 6 +++--- indoteknik_custom/views/advance_payment_request.xml | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index 722b01f2..a2c39b52 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -463,9 +463,9 @@ class AdvancePaymentRequest(models.Model): jakarta_tz = pytz.timezone('Asia/Jakarta') now = datetime.now(jakarta_tz).replace(tzinfo=None) - ap_user_ids = [23, 9468] - if self.env.user.id not in ap_user_ids: - raise UserError('Hanya User AP yang dapat menggunakan fitur ini.') + # ap_user_ids = [23, 9468] + # if self.env.user.id not in ap_user_ids: + # raise UserError('Hanya User AP yang dapat menggunakan fitur ini.') for rec in self: if not rec.attachment_file_image and not rec.attachment_file_pdf: diff --git a/indoteknik_custom/views/advance_payment_request.xml b/indoteknik_custom/views/advance_payment_request.xml index 39f8f588..6a0d61b1 100644 --- a/indoteknik_custom/views/advance_payment_request.xml +++ b/indoteknik_custom/views/advance_payment_request.xml @@ -25,12 +25,22 @@ type="object" string="Buat Jurnal PUM" class="btn-info" - attrs="{'invisible': ['|', ('status', 'not in', ['approved']), ('is_cab_visible', '=', True)]}"/> + attrs="{'invisible': ['|', + ('status', 'not in', ['approved']), + '|', + ('is_cab_visible', '=', True), + ('type_request', '!=', 'pum') + ]}"/>