What are the steps to reproduce your issue ?
1. Go to Contacts > Configuration > Localization > Countries > Select a country
2. Edit the 'Layout in reports' (enable debug mode) and add an invalid field
3. Create a Quotation and search for a customer from the country you edited.
What is currently happening ?
Traceback is raised and you can't select the customer anymore
Why is this happening ?
Because the key is not defined.
How to fix the bug ?
Handle KeyError to detect if the user put an undefined key
Handle ValueError to detect if the user put an invalid format key
opw-2447078
closesodoo/odoo#69014
X-original-commit: 675feb254ed3448571818a77c920012cbd066c8b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>