Fixed bug when load ul in load order with cancelled shipment.

This commit refs #26058
This commit is contained in:
jm.pardo 2023-02-23 14:01:42 +01:00
parent c890cb0d06
commit 7fbf7b7719
1 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,11 @@ class LoadOrder(metaclass=PoolMeta):
shipment.number = number
return shipment
def _update_sale(self, uls):
if self.shipment and self.shipment.state == 'cancelled':
return
super()._update_sale(uls)
@classmethod
def run(cls, records):
pool = Pool()