From 965b9ef647f582664c8fe4d85831faca33642468 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 24 Jan 2024 12:00:12 +0700 Subject: status printed di sj --- indoteknik_custom/models/purchase_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models/purchase_order.py') diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index ebadff06..984c8a23 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -302,9 +302,9 @@ class PurchaseOrder(models.Model): res = super(PurchaseOrder, self).button_confirm() current_time = datetime.now() - if self.total_percent_margin < self.total_so_percent_margin and not self.env.user.is_purchasing_manager and not self.env.user.is_leader: + if self.total_percent_margin < self.total_so_percent_margin and not self.env.user.is_purchasing_manager or not self.env.user.is_leader: raise UserError("Beda Margin dengan Sales, harus approval Manager") - if not self.sale_order_id and not self.env.user.is_purchasing_manager and not self.env.user.is_leader: + if not self.sale_order_id and not self.env.user.is_purchasing_manager or not self.env.user.is_leader: raise UserError("Tidak ada link dengan SO, harus approval Manager") send_email = False self.add_product_to_pricelist() -- cgit v1.2.3