summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-13 11:07:42 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-13 11:07:42 +0700
commit99d097d93635eaa1cf92064f1e9070107fe0d8a5 (patch)
treed51979569fa2b8ef334869cd54a7bc308f6eee43 /indoteknik_custom/models
parent698650e73503d0b780694e150fb5cb3f8e91d83d (diff)
(andri) checked & jenis biaya hanya bisa AP
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/advance_payment_request.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py
index dbf2e9ee..02b1a23f 100644
--- a/indoteknik_custom/models/advance_payment_request.py
+++ b/indoteknik_custom/models/advance_payment_request.py
@@ -804,6 +804,18 @@ class ReimburseLine(models.Model):
is_checked = fields.Boolean(string='Checked', default=False)
+ is_current_user_ap = fields.Boolean(
+ string="Is Current User AP",
+ compute='_compute_is_current_user_ap'
+ )
+
+ def _compute_is_current_user_ap(self):
+ ap_user_ids = [23, 9468]
+ is_ap = self.env.user.id in ap_user_ids
+ for line in self:
+ line.is_current_user_ap = is_ap
+
+
@api.onchange('is_vehicle', 'vehicle_type', 'distance')
def _onchange_vehicle_data(self):
if not self.is_vehicle: