Files
odoo_source/addons/phone_validation/tools
Thibault Delavallée bdfb802293 [IMP] phone_validation: try to be defensive when parsing phone numbers
After some testing notably with WhatsApp module, it appears usage of phone
numbers could be a bit more defensive to try to accomodate with data users
entered. Notably when failing to recognize a number, we can distinguish
error and try to reformat it based on two commonly spotted errors

  * missing "+" in front of a E164-like number (e.g. '32455001122');
  * usage of "00" in countries where it is not really standard to use it
    instead of a "+" (e.g. '0032455001122');

Those find of numbers generate a 'TOO_LONG' error from phonenumbers library.
In that case we try to reformat it just to see if we can do better with it.

Task-3608129 (Whatsapp: Moultifix !)

X-original-commit: odoo/odoo@85c1306156
Part-of: odoo/odoo#146398
2023-12-15 17:13:25 +00:00
..