Skip to content
Browse files

[FIX] purchase: fix error when creating new quotation of purchase

- in purchase there are 3 fields that computes by '_amount_all', so it is called 3 times. but, round method has 'ensure_one' therefore it gives singleton error.

- So, removed rounding as there is need of rounding explicitly since these are monetary fields which will be rounded automatically.

Related to Issue: 1948645
  • Loading branch information...
pka-odoo committed Mar 20, 2019
1 parent 3cbb8d5 commit fd8569f072e7a65738ec6bb89b8988106589bd57
Showing with 2 additions and 2 deletions.
  1. +2 −2 addons/purchase/models/
@@ -27,8 +27,8 @@ def _amount_all(self):
amount_untaxed += line.price_subtotal
amount_tax += line.price_tax
'amount_untaxed': order.currency_id.round(amount_untaxed),
'amount_tax': order.currency_id.round(amount_tax),
'amount_untaxed': amount_untaxed,
'amount_tax': amount_tax,
'amount_total': amount_untaxed + amount_tax,

0 comments on commit fd8569f

Please sign in to comment.
You can’t perform that action at this time.