changeset 02c1417e21ae in modules/stock_package_shipping_dpd:default
details: 
https://hg.tryton.org/modules/stock_package_shipping_dpd?cmd=changeset&node=02c1417e21ae
description:
        Add optional address to contact mechanism

        issue11705
        review421691006
diffstat:

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

diffs (25 lines):

diff -r 0c27fbba7e57 -r 02c1417e21ae CHANGELOG
--- a/CHANGELOG Sun Sep 25 20:27:25 2022 +0200
+++ b/CHANGELOG Sat Oct 01 14:52:06 2022 +0200
@@ -1,3 +1,5 @@
+* Use contact mechanism from address
+
 Version 6.4.0 - 2022-05-02
 * Bug fixes (see mercurial logs for details)
 * Add support for Python 3.10
diff -r 0c27fbba7e57 -r 02c1417e21ae stock.py
--- a/stock.py  Sun Sep 25 20:27:25 2022 +0200
+++ b/stock.py  Sat Oct 01 14:52:06 2022 +0200
@@ -222,10 +222,10 @@
         if party.full_name != address.party_full_name:
             shipping_party['name2'] = party.full_name[:35]
 
-        phone = party.contact_mechanism_get({'phone', 'mobile'}, usage=usage)
+        phone = address.contact_mechanism_get({'phone', 'mobile'}, usage=usage)
         if phone and len(phone.value) <= 30:
             shipping_party['phone'] = phone.value
-        email = party.contact_mechanism_get('email', usage=usage)
+        email = address.contact_mechanism_get('email', usage=usage)
         if email and len(email.value) <= 50:
             shipping_party['email'] = email.value
 

Reply via email to