Files
odoo_source/addons/base_vat
Mahamadasif Ansari 4e58076611 [FIX] base_vat: prevent IndexError when enter single digit vat
Currently, when the user enters a value of `VAT` like '/' or
any single character, an error occurs.

Error: "IndexError: string index out of range"

This is because the recently applied PR [1] added a Line [1] that tries to
access the second digit of VAT, but the user added only one character.

This commit fixes the above issue by accessing the second character
when the length of the VAT is more than one character.

PR [1]-https://github.com/odoo/odoo/pull/136146
Line [1]-https://github.com/odoo/odoo/blob/422625615b2f6708667fa44d2a9e83ad3e66e5af/addons/base_vat/models/res_partner.py#L92

sentry-4524865338

closes odoo/odoo#138454

X-original-commit: 57f59f2088c46f4603ff83bbcf2db42d705331fe
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: ANSARI MAHAMADASIF (maan) <maan@odoo.com>
2023-10-12 03:59:52 +00:00
..