From 9ce9aadf219c8132ad3fc55e6fbf8a2fb2849a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 May 2017 18:12:24 +0200 Subject: [PATCH] Set delivery_full_address to customer address issue6427 review38311002 --- purchase.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/purchase.py b/purchase.py index 295b7fb411..1473ce758c 100644 --- a/purchase.py +++ b/purchase.py @@ -131,6 +131,13 @@ class Purchase: if self.customer: self.delivery_address = self.customer.address_get(type='delivery') + @property + def delivery_full_address(self): + address = super(Purchase, self).delivery_full_address + if self.customer and self.delivery_address: + address = self.delivery_address.full_address + return address + def get_drop_shipments(self, name): DropShipment = Pool().get('stock.shipment.drop') return list(set(m.shipment.id for l in self.lines for m in l.moves