Do not require lot for supplier moves from an origin different of shipment in.

This commit refs #29514
This commit is contained in:
Sergio Morillo 2023-11-30 18:55:35 +01:00
parent a7a4cb0199
commit 835922321d

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.origin, ShipmentIn))
and self.from_location.type == 'supplier')):
return super().check_lot()
@classmethod