Compare commits

...

2 commits

Author SHA1 Message Date
Sergio Morillo 5171c7c9b9 Fix shipment move check 2023-11-30 19:08:08 +01:00
Sergio Morillo 835922321d Do not require lot for supplier moves from an origin different of shipment in.
This commit refs #29514
2023-11-30 18:55:35 +01:00

View file

@ -26,8 +26,11 @@ class Move(metaclass=PoolMeta):
__name__ = 'stock.move'
def check_lot(self):
ShipmentIn = Pool().get('stock.shipment.in')
if (not self.product.lot_force_assign
or self.from_location.type == 'supplier'):
or (
(not self.origin or isinstance(self.shipment, ShipmentIn))
and self.from_location.type == 'supplier')):
return super().check_lot()
@classmethod