minor fix order search lot

This commit is contained in:
wilson gomez 2022-01-04 10:56:50 -05:00
parent b50f821a70
commit e84364488f

View file

@ -90,7 +90,7 @@ class InternalShipment(metaclass=PoolMeta):
('active', '=', True),
('quantity', '>', 0),
]
lots = Lot.search(dom, order=[('create_date', 'ASC')])
lots = Lot.search(dom, order=[('expiration_date', 'ASC NULLS LAST'), ('create_date', 'ASC')])
return lots
for move in shipment.moves: