summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 036fba1b..ca98cde4 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -360,6 +360,7 @@ class SaleOrder(models.Model):
def _compute_total_percent_margin(self):
for order in self:
if order.amount_untaxed == 0:
+ order.total_percent_margin = 0
continue
order.total_percent_margin = round((order.total_margin / order.amount_untaxed) * 100, 2)