summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-09-01 07:58:42 +0000
committerIT Fixcomart <it@fixcomart.co.id>2022-09-01 07:58:42 +0000
commit645b385f1feea20975f1abaacdf6ffdcb0af7ff1 (patch)
treeeebe5fca40c038aa21fc230f7b5707fa38b27b20 /indoteknik_custom/models/sale_order.py
parent8e7e127bb6e7f5b67771e24ba12322ff2718399a (diff)
parente682e0518fcaa62588287bb974d8697ceed8300f (diff)
Merged in master (pull request #6)
Master
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-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..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