From 9c663e33bebc09d65614c5158c98270e964c9a06 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 30 Oct 2025 11:15:47 +0700 Subject: fix bug --- indoteknik_custom/models/sale_order.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 494aeaa2..b8de1697 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -2716,11 +2716,13 @@ class SaleOrder(models.Model): if user.is_leader or user.is_sales_manager: return True - if user.id in (3401, 20, 3988, 17340): # admin (fida, nabila, ninda) + if not self.env.context.get("ask_approval") and user.id in (3401, 20, 3988, 17340): # admin (fida, nabila, ninda) raise UserError("Yahaha gabisa confirm so, minta ke sales nya ajah") - + if self.env.context.get("ask_approval") and user.id in (3401, 20, 3988): return True + + salesperson_id = self.user_id.id approver_id = user.id -- cgit v1.2.3