[FIX] report_intrastat: discount on invoice

- Create an invoice with a discount
- Validate
- Open the Intrastat report

The discount is not taken into account.

opw-1913155

closes odoo/odoo#29161
This commit is contained in:
Nicolas Martinelli
2018-11-29 17:00:36 +00:00
parent 1d553eea7b
commit 80a11ca27d
@@ -36,7 +36,7 @@ class ReportIntrastat(models.Model):
intrastat.id as intrastat_id,
upper(inv_country.code) as code,
sum(case when inv_line.price_unit is not null
then inv_line.price_unit * inv_line.quantity
then inv_line.price_unit * (1.0 - coalesce(inv_line.discount, 0.0) / 100.0) * inv_line.quantity
else 0
end) as value,
sum(