diff --git a/pos_restrict_product_stock/models/pos_session.py b/pos_restrict_product_stock/models/pos_session.py
index 959e267e1..bb529fb76 100644
--- a/pos_restrict_product_stock/models/pos_session.py
+++ b/pos_restrict_product_stock/models/pos_session.py
@@ -33,4 +33,20 @@ class PosSession(models.Model):
result = super()._loader_params_product_product()
result['search_params']['fields'].append('qty_available')
result['search_params']['fields'].append('virtual_available')
+ # ❌ DO NOT add pos_stock_qty here (not a real field)
return result
+
+ def _get_pos_ui_product_product(self, params):
+ """Inject warehouse-specific stock"""
+ products = super()._get_pos_ui_product_product(params)
+ pos_location = self.config_id.picking_type_id.default_location_src_id or \
+ self.config_id.picking_type_id.warehouse_id.lot_stock_id
+
+ for product in products:
+ product_id = product['id']
+ product_record = self.env['product.product'].browse(product_id)
+ product['pos_stock_qty'] = product_record.with_context(
+ location=pos_location.id,
+ compute_child=True
+ ).qty_available
+ return products
diff --git a/pos_restrict_product_stock/static/src/js/OrderScreen.js b/pos_restrict_product_stock/static/src/js/OrderScreen.js
index 3e4d20422..7e44e6565 100644
--- a/pos_restrict_product_stock/static/src/js/OrderScreen.js
+++ b/pos_restrict_product_stock/static/src/js/OrderScreen.js
@@ -25,7 +25,7 @@ patch(Order.prototype, {
for (const { product, total_qty, name } of Object.values(productQuantities)) {
if (is_restrict) {
- const qty_available = product.qty_available;
+ const qty_available = product.pos_stock_qty ?? product.qty_available;
const virtual_qty = product.virtual_available;
const should_restrict = (
diff --git a/pos_restrict_product_stock/static/src/js/ProductScreen.js b/pos_restrict_product_stock/static/src/js/ProductScreen.js
index 55fe4e099..5e1d77c54 100644
--- a/pos_restrict_product_stock/static/src/js/ProductScreen.js
+++ b/pos_restrict_product_stock/static/src/js/ProductScreen.js
@@ -17,7 +17,7 @@ patch(PosStore.prototype, {
order_quantity = selected_orderline.quantity + 1;
}
- const qty_available = product.qty_available;
+ const qty_available = product.pos_stock_qty ?? product.qty_available;
const virtual_qty = product.virtual_available;
const should_restrict =
diff --git a/pos_restrict_product_stock/static/src/xml/ProductItem.xml b/pos_restrict_product_stock/static/src/xml/ProductItem.xml
index 125136648..6a403f8b4 100644
--- a/pos_restrict_product_stock/static/src/xml/ProductItem.xml
+++ b/pos_restrict_product_stock/static/src/xml/ProductItem.xml
@@ -9,7 +9,7 @@
-
+
@@ -20,7 +20,7 @@
-
+