Problem:
It is possible for an `account.bank.statement.line` to have in the
database the field `amount` set to `NULL`. It happens when importing
from the 'bank statement line' list view (Favorites>Import Records), a
csv file that have no column 'amount'.
This causes an issue for the queries accesing that value, as they expect
a number and get a Nonetype (for example in the function
`_compute_running_balance`).
Solution:
As this is stable, we cannot change the attributes of the field.
So here, in the `create` function, we set the amount to 0 if
it is not specified. Like when you create a bank statement line with the
'create' button, where this field is set to 0 per default (client side).
opw-3161652
closesodoo/odoo#111585
X-original-commit: 37b271e777576fbaed6e718bb7cd1c064fdb9a54
Signed-off-by: Laurent Smet <las@odoo.com>