From d0a6aeebff76728a5f850b59cb87990b97cd3780 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 8 Jul 2010 10:34:25 +0200 Subject: [PATCH] [FIX] report_intrastat: correct names for uom fields - to be checked! bzr revid: odo@openerp.com-20100708083425-kk3xsz8oz1obcl1l --- addons/report_intrastat/report_intrastat.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py index 3bf58ea034e..532bede5ac3 100644 --- a/addons/report_intrastat/report_intrastat.py +++ b/addons/report_intrastat/report_intrastat.py @@ -88,26 +88,12 @@ class report_intrastat(osv.osv): else 0 end) as value, sum( - case when uom.category_id != puom.category_id then pt.weight_net * inv_line.quantity - else - case when uom.factor_inv_data > 0 - then - pt.weight_net * inv_line.quantity * uom.factor_inv_data - else - pt.weight_net * inv_line.quantity / uom.factor - end - end + case when uom.category_id != puom.category_id then (pt.weight_net * inv_line.quantity) + else (pt.weight_net * inv_line.quantity * uom.factor) end ) as weight, sum( case when uom.category_id != puom.category_id then inv_line.quantity - else - case when uom.factor_inv_data > 0 - then - inv_line.quantity * uom.factor_inv_data - else - inv_line.quantity / uom.factor - end - end + else (inv_line.quantity * uom.factor) end ) as supply_units, inv.currency_id as currency_id,