diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-05 10:07:27 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-05 10:07:27 +0700 |
| commit | 9b47b9b9c09e2a04bf3be0e81c0931e825500ea4 (patch) | |
| tree | f359230ce5242ffe0c0ef38ad0406cb0e6d9a79d | |
| parent | 2b4d72b6157a438f0a77be8aaae6875c2b415392 (diff) | |
cr change access approve rpo
| -rw-r--r-- | indoteknik_custom/models/requisition.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 6d10f511..75529378 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -87,15 +87,11 @@ class Requisition(models.Model): if self.env.user.id == 19 or self.env.user.id == 28: self.sales_approve = True elif self.env.user.id == 21 or self.env.user.id == 28: - if not self.sales_approve and not self.env.user.id == 21: - raise UserError('Darren Belum Approve') self.merchandise_approve = True def create_po_from_requisition(self): - if not self.sales_approve: - raise UserError('Harus Di Approve oleh Darren') - if not self.merchandise_approve: - raise UserError('Harus Di Approve oleh Rafly') + if not self.sales_approve and not self.merchandise_approve: + raise UserError('Harus Di Approve oleh Darren atau Rafly') if not self.requisition_lines: raise UserError('Tidak ada Lines, belum bisa create PO') if self.is_po: |
