summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-08-24 13:37:47 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-08-24 13:37:47 +0700
commit172633e7dc38dfbb4533b10fcd61e603691ae489 (patch)
treeb446b6ddb2644422813f151c8bcd60901536f1e9
parentf92a148445a4c5de3d4e80d051783f7af5813d32 (diff)
fix error compute item margin if unit price < 0
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index d9ef0b85..854a482a 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -92,7 +92,7 @@ class SaleOrderLine(models.Model):
def compute_item_margin(self):
for line in self:
- if not line.product_id or line.price_unit == 0:
+ if not line.product_id or line.price_unit <= 0:
line.item_margin = 0
line.item_percent_margin = 0
continue