From 9b47b9b9c09e2a04bf3be0e81c0931e825500ea4 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 5 Jun 2025 10:07:27 +0700 Subject: cr change access approve rpo --- indoteknik_custom/models/requisition.py | 8 ++------ 1 file 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: -- cgit v1.2.3