diff --git a/stock_by_warehouse/__manifest__.py b/stock_by_warehouse/__manifest__.py index 39d351fd88c..aced0f85119 100644 --- a/stock_by_warehouse/__manifest__.py +++ b/stock_by_warehouse/__manifest__.py @@ -1,6 +1,6 @@ { "name": "Stock by Warehouse", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "summary": """ Know the stock in all your warehouses with a simple click from the product form. diff --git a/stock_by_warehouse/models/product_product.py b/stock_by_warehouse/models/product_product.py index 44cdcf561f2..b6c80f9f8b1 100644 --- a/stock_by_warehouse/models/product_product.py +++ b/stock_by_warehouse/models/product_product.py @@ -51,7 +51,7 @@ def _compute_qty_available_not_reserved(self): quants = ( self.env["stock.quant"] .with_context(lang=False) - .read_group(domain_quant, fields=["product_id", "quantity", "reserved_quantity"], groupby="product_id") + ._read_group(domain_quant, groupby='product_id', aggregates=['quantity:sum', 'reserved_quantity:sum']) ) res = {} diff --git a/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml b/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml index bf2fe609cd3..465fb93fe6b 100644 --- a/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml +++ b/stock_by_warehouse/static/src/components/warehouse/warehouse_field.xml @@ -1,7 +1,7 @@ - +

The product is available in: locations. @@ -24,7 +24,7 @@

- +

@@ -85,7 +85,7 @@
- +

diff --git a/stock_by_warehouse/views/product_product_views.xml b/stock_by_warehouse/views/product_product_views.xml index 01e2fe81807..e9303dc9fa8 100644 --- a/stock_by_warehouse/views/product_product_views.xml +++ b/stock_by_warehouse/views/product_product_views.xml @@ -11,19 +11,16 @@ name="warehouses_stock" widget="warehouse" groups="stock.group_stock_multi_warehouses" - attrs="{'invisible': [('detailed_type', '!=', 'product')]}" - /> + invisible="detailed_type != 'product'"/>