From 2cb43f313d29aa2d8ea10ba24366fe67f19942c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 14 Nov 2024 12:50:59 +0100 Subject: [PATCH] Use shipping properties instead of direct field The properties were added in 682fe06f9774 to provide abstraction between the different shipments. --- modules/stock_package_shipping/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/stock_package_shipping/stock.py b/modules/stock_package_shipping/stock.py index 5df4aca503..a18fd1ca97 100644 --- a/modules/stock_package_shipping/stock.py +++ b/modules/stock_package_shipping/stock.py @@ -212,9 +212,9 @@ class ShippingMixin: Warning = pool.get('res.user.warning') for shipment in shipments: if (not shipment.carrier - and shipment.delivery_address + and shipment.shipping_to_address and shipment.warehouse not in - shipment.delivery_address.warehouses): + shipment.shipping_to_address.warehouses): name = Warning.format('no_carrier', [shipment]) if Warning.check(name): raise PackWarning(name,