[FIX] point of sale: rounding globally

The amount total computed for pos order must be the sum of the rounded tax amount
and the rounded untax amount. Inspired from _amount_total in "sale.order".

opw:643254
This commit is contained in:
Goffin Simon 2015-06-25 10:19:52 +02:00
parent 33a65c2b8e
commit a3fbc2da86
1 changed files with 2 additions and 1 deletions

View File

@ -689,7 +689,8 @@ class pos_order(osv.osv):
val1 += self._amount_line_tax(cr, uid, line, context=context)
val2 += line.price_subtotal
res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val1)
res[order.id]['amount_total'] = cur_obj.round(cr, uid, cur, val1+val2)
amount_untaxed = cur_obj.round(cr, uid, cur, val2)
res[order.id]['amount_total'] = res[order.id]['amount_tax'] + amount_untaxed
return res
_columns = {