Files
odoo_source/addons
rootandThibault Delavallee bd5f307c66 [FIX] phone_validation: fallback if no region provided
Before this commit if you would call phone_parse() but not pass along a
country code it would crash. This is reproducable by calling the phone_parse
function and not setting a country on the contact. In this case you would get
the following traceback:

  AttributeError: 'bool' object has no attribute 'upper'.

This happens because the phonenumbers library tries to upper() the region but
if Odoo doesn't have a country set it passes along False. By doing a fallback
to 'None' the phonenumbers library will natively handle this and the user in
the UI does not get a traceback.

Task-2852953

closes odoo/odoo#112699

X-original-commit: 9b75d7ac1a912ff3d15c393a6a23018a18b3b9bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
2023-02-14 18:11:52 +01:00
..
2023-02-03 06:06:23 +01:00
2023-02-13 16:20:52 +01:00
2023-01-30 19:45:56 +01:00
2023-01-30 15:35:25 +01:00
2023-02-07 16:38:26 +01:00
2023-02-10 12:32:26 +01:00
2023-02-14 17:09:06 +01:00
…