[FIX] stock_vlm_mgmt: location general inventory

We were lacking the default location id so we could select the tray. It
was also needed to avoid compting a pos when no tray is selected.
This commit is contained in:
David
2024-08-19 13:00:30 +02:00
parent cca7f9c414
commit 28f8d7d1cd
2 changed files with 2 additions and 1 deletions

View File

@@ -131,6 +131,7 @@ class StockLocation(models.Model):
action["context"] = dict(
self.env.context,
vlm_inventory_mode=True,
default_location_id=self.id,
)
view_id = self.env.ref("stock_vlm_mgmt.view_stock_quant_inventory_tree").id
action.update(

View File

@@ -38,7 +38,7 @@ class VlmTrayCellPositionMixin(models.AbstractModel):
@api.depends("tray_matrix")
def _compute_pos(self):
for record in self:
for record in self.filtered("tray_matrix"):
if not record.tray_matrix["selected"]:
continue
record.update(