Skip to content

Commit

Permalink
[FIX] stock_by_warehouse: Improve stock information accuracy
Browse files Browse the repository at this point in the history
Resolved an issue where multiple locations displayed incorrect stock
information due to problematic contexts. By eliminating the cache, we
now ensure accurate computation of quantity Units for products.

Closes Vauxoo#1633
  • Loading branch information
allanpa88 authored and luisg123v committed Jan 18, 2024
1 parent 4fdb227 commit 4ee3a4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stock_by_warehouse/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def _compute_get_quantity_warehouses_json(self):
.with_company(warehouse.company_id)
.with_context(warehouse=warehouse.id, location=False)
)
tmpl.invalidate_recordset()
if warehouse_id and warehouse_id.id == warehouse.id:
info["warehouse"] = tmpl.qty_available_not_res
info["content"].append(
Expand Down

0 comments on commit 4ee3a4e

Please sign in to comment.