From fa80d405e69d49177efbdfc6c13a33be22492d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 1 Oct 2022 14:52:06 +0200 Subject: [PATCH] Add optional address to contact mechanism issue11705 review421691006 --- CHANGELOG | 2 ++ stock.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6dcf1a1c62..4d8a9e1035 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/stock.py b/stock.py index 7480c11551..64c95a4710 100644 --- a/stock.py +++ b/stock.py @@ -147,9 +147,9 @@ class CreateShippingSendcloud(Wizard): cm = UoM(ModelData.get_id('product', 'uom_centimeter')) party = shipment.shipping_to address = shipment.shipping_to_address - phone = party.contact_mechanism_get( + phone = address.contact_mechanism_get( {'phone', 'mobile'}, usage=usage) - email = party.contact_mechanism_get('email', usage=usage) + email = address.contact_mechanism_get('email', usage=usage) street_lines = (address.street or '').splitlines() parcel = { 'name': address.party_full_name,