Files
odoo_source/addons/partner_autocomplete/models
alsh-odoo 631ab3ec13 [FIX] partner_autocomplete: fix traceback in vat number matching
This issue is occurring when the user tries to add a VAT number
while creating a new contact

To reproduce this issue:
1) Install "contacts" and "partner_autocomplete"
2) Create a new contact from 'Contacts'
3) Give a valid VAT number e.g:- "SK2120312645"
4) Traceback occurs in the terminal

Error:- "IndexError: list index out of range"

https://github.com/odoo/odoo/blob/382b64c2f14073cfff1a8ef9290b5c7834d52188/addons/partner_autocomplete/models/res_partner.py#L143-L156

In some cases, the expected "zip_city" value is not at the last of the address list ,
which leads to a traceback.

After applying this commit will resolve this issue by searching "zip_city"
based on regex.

sentry-5058467547

closes odoo/odoo#158580

X-original-commit: 55c605f44d3a4f280946f1c1fec3f5e1534b4ef9
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2024-03-22 05:48:04 +00:00
..