Do not truncate phone number

If the number is too long, we must not fill it.

issue11237
This commit is contained in:
Cédric Krier committed 2022-02-26 11:19:43 +01:00
1 parent 43d239ebcb
commit 918c46bbf7
1 file changed
+2 -2
+2 -2
View File
@@ -223,8 +223,8 @@ class CreateDPDShipping(Wizard):
shipping_party['name2'] = party.full_name[:35]
phone = party.contact_mechanism_get({'phone', 'mobile'})
if phone:
shipping_party['phone'] = phone.value[:30]
if phone and len(phone.value) <= 30:
shipping_party['phone'] = phone.value
email = party.contact_mechanism_get('email')
if email and len(email.value) <= 50:
shipping_party['email'] = email.value