Purchase design

This commit is contained in:
2026-06-08 20:54:58 +02:00
parent c36c6a411f
commit 79c701b711
2 changed files with 16 additions and 6 deletions

View File

@@ -742,6 +742,10 @@ class Purchase(metaclass=PoolMeta):
route_to = getattr(
getattr(shipment, 'to_location', None),
'rec_name', None)
route_from = route_from or getattr(
getattr(self, 'from_location', None), 'rec_name', None)
route_to = route_to or getattr(
getattr(self, 'to_location', None), 'rec_name', None)
if route_from or route_to:
shipped_routes.append(
'%s > %s' % (route_from or '-', route_to or '-'))
@@ -765,6 +769,12 @@ class Purchase(metaclass=PoolMeta):
route_to = getattr(
getattr(shipment, 'to_location', None),
'rec_name', None)
route_from = route_from or getattr(
getattr(self, 'from_location', None),
'rec_name', None)
route_to = route_to or getattr(
getattr(self, 'to_location', None),
'rec_name', None)
if route_from or route_to:
shipped_routes.append(
'%s > %s' % (route_from or '-', route_to or '-'))