changeset d4fdeb6e0378 in modules/stock_package_shipping_dpd:5.0
details: 
https://hg.tryton.org/modules/stock_package_shipping_dpd?cmd=changeset&node=d4fdeb6e0378
description:
        Do not truncate phone number

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

        issue11237
        (grafted from ff9c686969593446f4bab530e36329eca908c5db)
diffstat:

 stock.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 40a4be32fe13 -r d4fdeb6e0378 stock.py
--- a/stock.py  Tue Mar 01 19:27:06 2022 +0100
+++ b/stock.py  Sat Feb 26 11:19:43 2022 +0100
@@ -193,8 +193,8 @@
                 phone = mechanism.value
             if mechanism.type == 'email' and not email:
                 email = mechanism.value
-        if phone:
-            shipping_party['phone'] = phone[:30]
+        if len(phone) <= 30:
+            shipping_party['phone'] = phone
         if len(email) <= 50:
             shipping_party['email'] = email
 

Reply via email to