summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <andrifebriyadiputra@gmail.com>2025-04-30 15:29:04 +0700
committerIndoteknik . <andrifebriyadiputra@gmail.com>2025-04-30 15:29:04 +0700
commit6601e72946ebcbca6b73b20dd4f3f86f39f89265 (patch)
tree913a56769f73a0230125cd18bd3b4cc098421077
parentee062e41281b7a1f582ff299ba4c671a4bbbe24d (diff)
(andri) undo penyesuaian margin pada branch ini (agar tidak konflik)
-rwxr-xr-xindoteknik_custom/models/sale_order.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index ab63509b..e25b9570 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1453,11 +1453,10 @@ class SaleOrder(models.Model):
# Rule: # ≤ 15% → Pimpinan, > 15% - <24% → Manager, == 24% → Langsung Confirm
def _requires_approval_margin_leader(self):
- return self.total_percent_margin <= 15 and not self.env.user.is_leader
+ return self.total_percent_margin < 15 and not self.env.user.is_leader
def _requires_approval_margin_manager(self):
- return 15 < self.total_percent_margin <= 24 and not self.env.user.is_sales_manager and not self.env.user.is_leader
- # return self.total_percent_margin >= 15 and not self.env.user.is_leader and not self.env.user.is_sales_manager
+ return self.total_percent_margin >= 15 and not self.env.user.is_leader and not self.env.user.is_sales_manager
def _create_approval_notification(self, approval_role):
title = 'Warning'