From df0abcda446e5080c610e01288040636e1b7dbb5 Mon Sep 17 00:00:00 2001 From: Risvana Cybro Date: Mon, 15 Dec 2025 11:50:21 +0530 Subject: [PATCH] :Dec 15 [FIX] Bug Fixed 'pos_restrict_product_stock' --- pos_restrict_product_stock/__manifest__.py | 2 +- pos_restrict_product_stock/doc/RELEASE_NOTES.md | 8 +++++++- pos_restrict_product_stock/static/src/js/ProductScreen.js | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pos_restrict_product_stock/__manifest__.py b/pos_restrict_product_stock/__manifest__.py index 0493b6b1d..bee19ede2 100644 --- a/pos_restrict_product_stock/__manifest__.py +++ b/pos_restrict_product_stock/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################### { 'name': 'Display Stock in POS | Restrict Out-of-Stock Products in POS', - 'version': '16.0.2.2.2', + 'version': '16.0.2.2.3', 'category': 'Point of Sale', 'summary': "Enhance your Point of Sale experience by preventing the " "ordering of out-of-stock products during your session", diff --git a/pos_restrict_product_stock/doc/RELEASE_NOTES.md b/pos_restrict_product_stock/doc/RELEASE_NOTES.md index 49d623932..6a60a16d0 100644 --- a/pos_restrict_product_stock/doc/RELEASE_NOTES.md +++ b/pos_restrict_product_stock/doc/RELEASE_NOTES.md @@ -26,4 +26,10 @@ This will help prevent the ordering of out-of-stock products, whether entered vi #### 25.06.2025 #### Version 16.0.2.2.2 #### Update -- Fixed the bug and updated the out-of-stock condition. If the product quantity is out of stock, a popup will be displayed. \ No newline at end of file +- Fixed the bug and updated the out-of-stock condition. If the product quantity is out of stock, a popup will be displayed. + +#### 06.11.2025 +#### Version 16.0.2.2.3 +#### Update +- Service products and products measured with “To Weigh in Scale” enabled are now excluded from +Restrict Product Out of Stock in POS. \ No newline at end of file diff --git a/pos_restrict_product_stock/static/src/js/ProductScreen.js b/pos_restrict_product_stock/static/src/js/ProductScreen.js index 440083b0a..9fed7e94f 100644 --- a/pos_restrict_product_stock/static/src/js/ProductScreen.js +++ b/pos_restrict_product_stock/static/src/js/ProductScreen.js @@ -10,7 +10,9 @@ const RestrictProductScreen = (ProductScreen) => class RestrictProductScreen ext const product = event.detail; const type = this.env.pos.config.stock_type; const is_restrict = this.env.pos.config.is_restrict_product; - + if (product.detailed_type === 'service' || product.to_weight) { + return super._clickProduct(event); + } let qty = 0; const selectedLine = this.currentOrder.selected_orderline; @@ -20,6 +22,7 @@ const RestrictProductScreen = (ProductScreen) => class RestrictProductScreen ext qty = 1; } + const qty_available = product.qty_available; const virtual_qty = product.virtual_available; @@ -60,6 +63,9 @@ const RestrictProductScreen = (ProductScreen) => class RestrictProductScreen ext } for (const { product, name, total_qty } of Object.values(productQtyMap)) { + if (product.detailed_type === 'service' || product.to_weight) { + continue; + } const qty_available = product.qty_available; const virtual_qty = product.virtual_available;