From 44dc882a2af128a523ad8c594056261ad294be34 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 27 May 2025 10:11:58 +0700 Subject: cr akses approval on rpo --- indoteknik_custom/models/requisition.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indoteknik_custom/models/requisition.py') 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: -- cgit v1.2.3 From b5bc5c5bc63ecbfa7efe9ff06a373bbedfcf7d42 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 27 May 2025 10:12:26 +0700 Subject: push --- indoteknik_custom/models/requisition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/models/requisition.py') diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 775acfb9..25133e72 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -88,7 +88,7 @@ class Requisition(models.Model): self.sales_approve = True elif self.env.user.id == 21 or self.env.user.id == 28: if not self.sales_approve: - raise UserError('Vita Belum Approve') + raise UserError('Darren Belum Approve') self.merchandise_approve = True def create_po_from_requisition(self): -- cgit v1.2.3