summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriFP <andrifebriyadiputra@gmail.com>2025-04-28 15:03:38 +0700
committerAndriFP <andrifebriyadiputra@gmail.com>2025-04-28 15:03:38 +0700
commitf2579dfcf01ab1687deb7221b50129fadb95d671 (patch)
tree2a030a61851e76ff4f3d446cf59b06e4f80cb682
parent082a4cf4c1f109644cb5c7a45ed1d3ffa69b1b06 (diff)
(andri) undo fix margin
-rwxr-xr-xindoteknik_custom/models/sale_order.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index ab63509b..02d61387 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1451,13 +1451,11 @@ class SaleOrder(models.Model):
due_extension.unlink()
return False
- # 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'