diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-07-24 13:19:04 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-07-24 13:19:04 +0700 |
| commit | 758db1e691ca9193ce5029246c98e3b27be540f6 (patch) | |
| tree | 105ca540453034837a31e247307f0114418b4e3e /indoteknik_custom/models/down_payment.py | |
| parent | 66d86b6f5b35274b66fe57bcee5864c64f564b97 (diff) | |
(andri) add user again for validation & rev Seq No Dokumen
Diffstat (limited to 'indoteknik_custom/models/down_payment.py')
| -rw-r--r-- | indoteknik_custom/models/down_payment.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indoteknik_custom/models/down_payment.py b/indoteknik_custom/models/down_payment.py index 8f449566..0263937b 100644 --- a/indoteknik_custom/models/down_payment.py +++ b/indoteknik_custom/models/down_payment.py @@ -238,7 +238,8 @@ class DownPayment(models.Model): ) elif rec.status == 'pengajuan2': - if self.env.user.id != 23: # ID user AP + ap_user_ids = [23, 9468] # List user ID yang boleh approve sebagai Finance AP + if self.env.user.id not in ap_user_ids: raise UserError("Hanya AP yang berhak menyetujui tahap ini.") rec.name_approval_ap = self.env.user.name rec.date_approved_ap = now @@ -308,7 +309,8 @@ class DownPayment(models.Model): def action_ap_only(self): - # if self.env.user.id != 23: + # ap_user_ids = [23, 9468] # List user ID yang boleh approve sebagai Finance AP + # if self.env.user.id not in ap_user_ids: # raise UserError('Hanya User AP yang dapat menggunakan ini.') return { 'name': 'Create CAB AP Only', @@ -542,6 +544,9 @@ class RealizationDownPayment(models.Model): self.message_post(body=f"Status realisasi diperbarui menjadi <b>{dict(self._fields['done_status'].selection).get(self.done_status)}</b> oleh {self.env.user.name}.") def action_cab(self): + # ap_user_ids = [23, 9468] # List user ID yang boleh approve sebagai Finance AP + # if self.env.user.id not in ap_user_ids: + # raise UserError('Hanya User AP yang dapat menggunakan ini.') self.ensure_one() if not self.pum_id or not self.pum_id.move_id: @@ -658,7 +663,8 @@ class RealizationDownPayment(models.Model): ) elif rec.status == 'pengajuan2': - if self.env.user.id != 23: # ID user AP + ap_user_ids = [23, 9468] # List user ID yang boleh approve sebagai Finance AP + if self.env.user.id not in ap_user_ids: raise UserError("Hanya AP yang berhak menyetujui tahap ini.") rec.name_approval_ap = self.env.user.name rec.date_approved_ap = now |
