summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/common.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-05-21 12:41:25 +0000
committerThibault Delavallée <tde@odoo.com>2019-07-02 10:40:46 +0000
commitdb177636540e632010bf5eebcd314b4c2f6960d3 (patch)
tree42c3b0353a93c1ecb152c1ab4b4e1101ab91141f /addons/test_mail/tests/common.py
parent566244b47ba32f7d509fcb2ef15dcbed51009a0e (diff)
[IMP] phone_validation, sms: improve phone validation and SMS sending API
Purpose of this commit is to support more formatting options in phone tools, to provide new API methods for phone numbers validatio. It also introduces a method on sms.api to send SMS in batch. This one uses a new route given in IAP services that send a batch of SMS instead of sending them one by one. Concerning phone validation, tools are updated to correctly handle all format supported by phonenumbers library. Indeed in addition to national and international formatting phonenumbers library also supports E164 (international without spaces) and RFC3966 (beautification of phone numbers). Let us support them and ease the use of our small tool methods in various addons, notably sms. Cleaning / check tools methods are added in phone validation module. Various methods allow to sanitize phone numbers according to a context record and/or some parameters. Those tools will be used in upcoming sms refactoring. Another purpose of this commit is to add phone_validation in dependencies of SMS application. Phone_validation module adds tools to parse and format phone numbers and allow to replace the manual check done currently. Adding it in dependencies of SMS does not change anything functionally as * library is still optional. If phonenumbers library is not installed the features are skipped without crashing; * no model is modified as it introduces only tools and a mixin. Models are updated in crm_phone_validation that updates lead and partner models; Related to task 1922163 Linked to PR #34516 Co-Authored-By: Thibault Delavallee <tde@odoo.com> Co-Authored-By: Pierre Rousseau <pro@odoo.com>
Diffstat (limited to 'addons/test_mail/tests/common.py')
0 files changed, 0 insertions, 0 deletions