summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py6
1 files 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