summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-03-06 08:47:25 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-03-06 08:47:25 +0700
commitafa847523195b695ec73430f9d1bda5a2fbfda51 (patch)
tree9e8e96d4e051113936aef79ec42c18f9e79d86bb
parent222fbfd3f88b6acea279887f7a4aee249960f000 (diff)
validasi product sla
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index fc99da36..e1074f42 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -484,6 +484,8 @@ class SaleOrder(models.Model):
max_slatime = 1 # Default SLA jika tidak ada
for line in rec.order_line:
product_sla = self.env['product.sla'].search([('product_variant_id', '=', line.product_id.id)], limit=1)
+ if(product_sla == False):
+ continue
slatime = int(product_sla.sla) if product_sla and product_sla.sla and product_sla.sla != 'Indent' else 15
max_slatime = max(max_slatime, slatime)