Automatic digit control

Automatically adjust the digits of the Numeric or Float fields when saving.
There is a lot of control at develop to avoid errors, I think this could be handled automatically.

I there a downside to doing this or something I’m missing?

What do you mean? Digits are constraint if there are adjusted, they are no more a constraint.

Yes, but, in general terms, this constraint only results in forcing you to put the “quantize with the field digits”. If this were carried out automatically, there would not be so many “quantize” all over the code. Would there be any drawback?

Silent failure is bad in general.
Rounding should be done explicitly at the right time.
Odoo did (maybe still do) that even for string and for sure this was a great source of error.

1 Like