summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-11-11 15:38:54 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-11-11 15:38:54 +0700
commitc1fec44860dae0d762959f1ab34617f6ef6e42cf (patch)
treedf9cfb62978510101faea791256fc9e22981f58b
parentb74b5bc94ed7a84ca2387fc0373f25b5eb27593d (diff)
(andri) fix ask approval for sales admin
-rwxr-xr-xindoteknik_custom/models/sale_order.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 1d34374e..6b1057dd 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -2404,6 +2404,13 @@ class SaleOrder(models.Model):
'Hanya bisa konfirmasi SO tim Anda.'
)
+ user = self.env.user
+ is_sales_admin = user.id in (3401, 20, 3988, 17340)
+ if is_sales_admin:
+ order.approval_status = 'pengajuan1'
+ order.message_post(body="Mengajukan approval ke Team Sales")
+ return self._create_approval_notification('Team Sales')
+
raise UserError("Bisa langsung Confirm")
def send_notif_to_salesperson(self, cancel=False):