-
- Downloads
[FIX] account: add default return for `_compute_amount`
The function `_compute_amount` on `account.tax` returns None if the value of
`amount_type` is not a standard Odoo value. During normal use, this will never
be the case, and if the value is modified by a custom module the method is
overriden in its code to account for that case.
During an upgrade, however, custom modules are not available. During the tests,
if a field needs to be computed using that function, it will break with
`TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'`
Adding a default return to the function in case the `amount_type` is not
recognisef will help prevent this.
closes odoo/odoo#84367
Signed-off-by:
Olivier Colson <oco@odoo.com>
Loading
Please register or sign in to comment