diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-27 10:11:58 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-27 10:11:58 +0700 |
| commit | 44dc882a2af128a523ad8c594056261ad294be34 (patch) | |
| tree | 48a5b2e3c426fff73907de6f42f4c9c3d3328243 | |
| parent | 121f5f732fc837e1f8b801eaaed038962aa574fd (diff) | |
cr akses approval on rpo
| -rw-r--r-- | indoteknik_custom/models/requisition.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 74236850..775acfb9 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -82,20 +82,20 @@ class Requisition(models.Model): state = ['done', 'sale'] if self.sale_order_id.state in state: raise UserError('SO sudah Confirm, akan berakibat double Purchase melalui PJ') - if self.env.user.id not in [377, 19, 28]: - raise UserError('Hanya Vita dan Darren Yang Bisa Approve') - if self.env.user.id == 377 or self.env.user.id == 28: + if self.env.user.id not in [21, 19, 28]: + raise UserError('Hanya Rafly dan Darren Yang Bisa Approve') + if self.env.user.id == 19 or self.env.user.id == 28: self.sales_approve = True - elif self.env.user.id == 19 or self.env.user.id == 28: + elif self.env.user.id == 21 or self.env.user.id == 28: if not self.sales_approve: raise UserError('Vita Belum Approve') self.merchandise_approve = True def create_po_from_requisition(self): if not self.sales_approve: - raise UserError('Harus Di Approve oleh Vita') - if not self.merchandise_approve: raise UserError('Harus Di Approve oleh Darren') + if not self.merchandise_approve: + raise UserError('Harus Di Approve oleh Rafly') if not self.requisition_lines: raise UserError('Tidak ada Lines, belum bisa create PO') if self.is_po: |
