diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-11-01 07:46:02 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-11-01 07:46:02 +0700 |
| commit | c933cb57a0dbea8ba062a251f28f0a72eb4bb080 (patch) | |
| tree | ae29a1720424fb088746bb4c8c531b9db028ed9f /indoteknik_custom | |
| parent | 9e8690f85b79649afb4dd38f28427a5da76000f6 (diff) | |
(andri) it
Diffstat (limited to 'indoteknik_custom')
| -rw-r--r-- | indoteknik_custom/models/advance_payment_request.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index c82c09ff..a3a3d20a 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -373,7 +373,8 @@ class AdvancePaymentRequest(models.Model): self.ensure_one() ap_user_ids = [23, 9468, 16729] - if self.env.user.id not in ap_user_ids: + is_it = self.env.user.has_group('indoteknik_custom.group_role_it') + if self.env.user.id not in ap_user_ids and not is_it: raise UserError('Hanya User AP yang dapat menggunakan fitur ini.') if not self.move_id: @@ -1127,8 +1128,9 @@ class AdvancePaymentSettlement(models.Model): def action_view_journal_uangmuka(self): self.ensure_one() - ap_user_ids = [23, 9468, 16729] - if self.env.user.id not in ap_user_ids: + ap_user_ids = [23, 9468, 16729] + is_it = self.env.user.has_group('indoteknik_custom.group_role_it') + if self.env.user.id not in ap_user_ids and not is_it: raise UserError('Hanya User AP yang dapat menggunakan fitur ini.') if not self.move_id: |
