summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-08-08 17:19:02 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-08-08 17:19:02 +0700
commit4303bc704835a48a3005d409f564030a2d53befc (patch)
tree10f4004b784ebc922baacbf2a351cadf1b686bce
parentbe4952c12d51106b4cffd6b7de1be09562829331 (diff)
(andri) fix
-rwxr-xr-xindoteknik_custom/models/sale_order.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 125a049b..e71e3830 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -2160,9 +2160,9 @@ class SaleOrder(models.Model):
# return self._create_notification_action('Notification',
# 'Terdapat invoice yang telah melewati batas waktu, mohon perbarui pada dokumen Due Extension')
- if not order._is_request_to_own_team_leader():
+ if not order.with_context(ask_approval=True)._is_request_to_own_team_leader():
return self._create_notification_action(
- 'Peringatan',
+ 'Peringatan',
'Hanya bisa konfirmasi SO tim Anda.'
)
if order._requires_approval_margin_leader():
@@ -2531,7 +2531,7 @@ class SaleOrder(models.Model):
if user.id in (3401, 20, 3988): # admin (fida, nabila, ninda)
return True
- if not self.team_id or not self.team_id.user_id:
+ if self.env.context.get("ask_approval") and user.id in (3401, 20, 3988):
return True
salesperson_id = self.user_id.id