changeset a8030c615afe in modules/stock_package_shipping_dpd:6.0
details:
https://hg.tryton.org/modules/stock_package_shipping_dpd?cmd=changeset&node=a8030c615afe
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 1057dc6e87c3 -r a8030c615afe stock.py
--- a/stock.py Tue Mar 01 19:26:49 2022 +0100
+++ b/stock.py Sat Feb 26 11:19:43 2022 +0100
@@ -222,8 +222,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