mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
inventory: always fetch tray
The check was means as an optimization: no need to fetch at tray already open. But "fetch_tray" will not only open the tray, it may also move the laser on the exact position. So we should do it for every inventory line.
This commit is contained in:
@@ -232,17 +232,13 @@ class VerticalLiftOperationInventory(models.Model):
|
||||
|
||||
def select_next_inventory_line(self):
|
||||
self.ensure_one()
|
||||
previous_line = self.current_inventory_line_id
|
||||
next_line = self.env["stock.inventory.line"].search(
|
||||
self._domain_inventory_lines_to_do(),
|
||||
limit=1,
|
||||
order="vertical_lift_tray_id, location_id, id",
|
||||
)
|
||||
self.current_inventory_line_id = next_line
|
||||
if (
|
||||
next_line
|
||||
and previous_line.vertical_lift_tray_id != next_line.vertical_lift_tray_id
|
||||
):
|
||||
if next_line:
|
||||
self.fetch_tray()
|
||||
return bool(next_line)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user