Skip to content

Commit 28f8d7d

Browse files
committed
[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.
1 parent cca7f9c commit 28f8d7d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

stock_vlm_mgmt/models/stock_location.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def action_view_vlm_quants(self):
131131
action["context"] = dict(
132132
self.env.context,
133133
vlm_inventory_mode=True,
134+
default_location_id=self.id,
134135
)
135136
view_id = self.env.ref("stock_vlm_mgmt.view_stock_quant_inventory_tree").id
136137
action.update(

stock_vlm_mgmt/models/vlm_tray_cell_position_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _compute_human_pos_y(self):
3838

3939
@api.depends("tray_matrix")
4040
def _compute_pos(self):
41-
for record in self:
41+
for record in self.filtered("tray_matrix"):
4242
if not record.tray_matrix["selected"]:
4343
continue
4444
record.update(

0 commit comments

Comments
 (0)