From 703c7e46faf49a32524bb2b413b11d577cb5cc47 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 2 Feb 2026 12:26:58 +0100 Subject: [PATCH] 02.02.26 --- modules/purchase/purchase.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/purchase/purchase.py b/modules/purchase/purchase.py index 9ba426a..96fe5af 100755 --- a/modules/purchase/purchase.py +++ b/modules/purchase/purchase.py @@ -2058,11 +2058,13 @@ class Line(sequence_ordered(), ModelSQL, ModelView): to_location = self.purchase.to_location move.from_location = from_location - - if to_location.type != 'customer': - move.to_location = Location.get_transit_id() - else: - move.to_location = to_location + logger.info("FROM_LOCATION:%s",self.purchase.from_location) + logger.info("TO_LOCATION:%s",self.purchase.to_location) + if to_location: + if to_location.type != 'customer': + move.to_location = Location.get_transit_id() + else: + move.to_location = to_location unit_price = l.get_lot_price() # if l.invoice_line_prov != None :