summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-03-27 09:26:43 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-03-27 09:26:43 +0700
commitd34d5dfbf8ef449b57bca9031bd5a28a1bf1928d (patch)
tree5222274caa9e0c8574f835c8f3c290d2379e29c8
parenta83022f278c3fbe6a8ed6ae92a2ffee2e4a7c992 (diff)
bug fix total percent margin edit
-rwxr-xr-xindoteknik_custom/models/sale_order.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 4ebc5d34..993eaed1 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1736,10 +1736,9 @@ class SaleOrder(models.Model):
"SO tidak dapat ditambahkan produk baru karena SO sudah menjadi sale order.")
res = super(SaleOrder, self).write(vals)
- self._validate_delivery_amt()
# self._check_total_margin_excl_third_party()
+ if any(fields in vals for fields in ['delivery_amt', 'carrier_id', 'shipping_cost_covered']):
+ self._validate_delivery_amt()
if any(field in vals for field in ["order_line", "client_order_ref"]):
self._calculate_etrts_date()
- if 'order_line' in vals:
- self._compute_etrts_date()
return res \ No newline at end of file