[FIX] account_peppol: update phonenumbers error message
If phonenumbers library is not installed, we should display a relevant error message, instead of the generic invalid phone number error message. closes odoo/odoo#154926 closes odoo/odoo#158546 Signed-off-by: Laurent Smet (las) <las@odoo.com> Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
@@ -554,6 +554,13 @@ msgstr ""
|
||||
msgid "Please fill in the EAS code and the Participant ID code."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#. odoo-python
|
||||
#: code:addons/account_peppol/models/res_company.py:0
|
||||
#, python-format
|
||||
msgid "Please install the phonenumbers library."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#. odoo-python
|
||||
#: code:addons/account_peppol/wizard/account_move_send.py:0
|
||||
|
||||
@@ -82,7 +82,7 @@ class ResCompany(models.Model):
|
||||
"Currently, only European countries are supported.")
|
||||
|
||||
if not phonenumbers:
|
||||
raise ValidationError(error_message)
|
||||
raise ValidationError(_("Please install the phonenumbers library."))
|
||||
|
||||
phone_number = phone_number or self.account_peppol_phone_number
|
||||
if not phone_number:
|
||||
|
||||
Reference in New Issue
Block a user