[FIX] point_of_sale: total revenue in report

In some cases, the "Sales total(Revenue)" of the report is different
from the sum of the payments. To reproduce:
- create a product with a sale price of 1.00
- sell 3 times a quantity of 0.333 of this product
- the "Sales total(Revenue)" will be equal to 1.00, while the total of
  payments is 0.99.

This is because in the report, we first sum all order lines, then we
perform a global rounding.

The solution is to use the total amount calculated for each order, which
is rounded at the appropriate time.

opw-682782
This commit is contained in:
Nicolas Martinelli
2016-08-01 13:15:30 +02:00
parent dcd03d778e
commit 35cd054cc8
+1 -1
View File
@@ -68,9 +68,9 @@ class pos_details(report_sxw.rml_parse):
'uom': pol.product_id.uom_id.name
}
data.append(result)
self.total += result['total']
self.qty += result['qty']
self.discount += result['discount']
self.total += pos.amount_total
if data:
return data
else: