Skip to content
Snippets Groups Projects
Commit 3a58dfa1 authored by Victor Feyens's avatar Victor Feyens
Browse files

[FIX] orm: do not try to convert zero amount for monetary fields.


When assigning a default value to a computed monetary field, if self
contains records with different currencies, the assignation will fail
when trying to round the value (because self[currency_field] is a
recordset of multiple currencies).

Globally, assigning a monetary value to records in different currencies
should never happen.  The only case we want to support is defaulting a
computed monetary to 0.0.

Add clear error when trying to set monetaries in multi-currency.

closes odoo/odoo#40128

Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
Co-authored-by: default avatarRaphael Collet <rco@odoo.com>
parent 5ca38da6
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment