Modified behavior when assigning entry move of product from supplier

This commit refs #27341
This commit is contained in:
Sergio Morillo 2023-08-03 10:50:06 +02:00
parent 915decaa56
commit 59c9d04e3f

View file

@ -2,6 +2,7 @@
# copyright notices and license terms.
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
from trytond.pyson import Id
class Move(metaclass=PoolMeta):
@ -37,7 +38,8 @@ class Move(metaclass=PoolMeta):
return order
def check_lot(self):
if not self.product.lot_force_assign:
if (not self.product.lot_force_assign
or self.from_location.type == 'supplier'):
return super().check_lot()
@classmethod