diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-08-25 09:58:07 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-08-25 09:58:07 +0700 |
| commit | acc12eb1eb0e4d0079e380dc6d5a72511a1d79f1 (patch) | |
| tree | 82f954e776d3ded8fd7bbd7be7ae6d0c4407ad2f | |
| parent | 172633e7dc38dfbb4533b10fcd61e603691ae489 (diff) | |
fix error item margin if down payment invoice
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 854a482a..6f901809 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 or line.product_uom_qty <= 0: line.item_margin = 0 line.item_percent_margin = 0 continue |
