When a user pays a donation with an empty amount value, the system
passes this value as an empty string, which is leading to a type-casting error
because an empty string cannot be directly converted to a numerical value like
a float.
Error: `ValueError: could not convert string to float: `
To handle this situation, we should use '_cast_as_int' and
'_cast_as_float' methods because these methods provide try-except blocks,
effectively handling these types of errors. This ensures that when an empty
amount value is encountered, the system manages the error.
sentry-4376573159
closesodoo/odoo#134026
X-original-commit: cae9f647b9e032aedfccc528d124acc639ecbf7f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>