diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-04-30 10:14:38 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-04-30 10:14:38 +0000 |
| commit | d5064c578955efa06d37589c1d0c462a4b6f47a2 (patch) | |
| tree | f3169edc4de5fb7677e88addebced448f2343fa1 | |
| parent | 768e34fbef00f2455f08cae7a9c5093942ff57a9 (diff) | |
| parent | 53d840b330769988ac9efd4c4c6fe4f21969d850 (diff) | |
Merged in margin-afp (pull request #286)
(andri) Penyesuaian Margin Approval (Live 1 Mei)
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 02d61387..569219f7 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -1452,10 +1452,11 @@ class SaleOrder(models.Model): return False 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 self.total_percent_margin >= 15 and not self.env.user.is_leader and not self.env.user.is_sales_manager + 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 def _create_approval_notification(self, approval_role): title = 'Warning' |
