diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-08-23 10:12:58 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-08-23 10:12:58 +0000 |
| commit | f92a148445a4c5de3d4e80d051783f7af5813d32 (patch) | |
| tree | fce3c2a8d7c9d2b429eb3834de7b13ef97519fa2 | |
| parent | 6aa301a106b822234af2812c9633f5b907ad2c53 (diff) | |
| parent | c3d42480e83f466f847bb0e8c051f45257de5cd2 (diff) | |
Merged in development (pull request #2)
bug fix item margin if unit price equal zero
| -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 50e6baa3..d9ef0b85 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: + if not line.product_id or line.price_unit == 0: line.item_margin = 0 line.item_percent_margin = 0 continue |
