From b70119d27264117f31591c4c47461f8fdb71d71d Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sat, 28 Oct 2017 20:55:35 +0200 Subject: [PATCH] Update intrastat_product_declaration.py @cubells I changed the check on 'price_unit' with value into price_subtotal. By doing so we also cover the case of invoice lines with 100% discount. Let me know if it's ok so that we can merge (and forward port to v10) --- intrastat_product/models/intrastat_product_declaration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intrastat_product/models/intrastat_product_declaration.py b/intrastat_product/models/intrastat_product_declaration.py index 9e537a1..e4394e5 100644 --- a/intrastat_product/models/intrastat_product_declaration.py +++ b/intrastat_product/models/intrastat_product_declaration.py @@ -501,7 +501,7 @@ class IntrastatProductDeclaration(models.Model): total_inv_weight = 0.0 for inv_line in invoice.invoice_line: - if not inv_line.price_unit: + if not inv_line.price_subtotal: continue if (