mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[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:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user