summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-10-30 11:15:47 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-10-30 11:15:47 +0700
commit9c663e33bebc09d65614c5158c98270e964c9a06 (patch)
treefb5846d17738ceb1e9dcdd1e3d739b12e9ad2df2
parent099bec753a310ec83ea3562a78c304dffb6d50d8 (diff)
fix bug
-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