diff --git a/pos_restrict_product_stock/doc/RELEASE_NOTES.md b/pos_restrict_product_stock/doc/RELEASE_NOTES.md index eec8d06d5..c4f8a8f00 100644 --- a/pos_restrict_product_stock/doc/RELEASE_NOTES.md +++ b/pos_restrict_product_stock/doc/RELEASE_NOTES.md @@ -14,5 +14,5 @@ This will help prevent the ordering of out-of-stock products, whether entered vi #### 05.11.2025 #### Version 17.0.2.1.2 #### Update -Service products and products measured in kilograms with “To Weigh in Scale” enabled are now excluded from -restricts stock availability check in POS. \ No newline at end of file +Service products and products measured “To Weigh in Scale” enabled are now excluded from +restricts stock availability check in POS. diff --git a/pos_restrict_product_stock/static/src/js/OrderScreen.js b/pos_restrict_product_stock/static/src/js/OrderScreen.js index 529af1071..0945aa8bc 100644 --- a/pos_restrict_product_stock/static/src/js/OrderScreen.js +++ b/pos_restrict_product_stock/static/src/js/OrderScreen.js @@ -24,8 +24,7 @@ patch(Order.prototype, { } for (const { product, total_qty, name } of Object.values(productQuantities)) { - if (product.detailed_type === 'service'|| product.uom_id[1]=="kg") { - console.log(product.type) + if (product.detailed_type === 'service'|| product.to_weight) { continue; } if (is_restrict) { diff --git a/pos_restrict_product_stock/static/src/js/ProductScreen.js b/pos_restrict_product_stock/static/src/js/ProductScreen.js index 757d2ece3..390db5f07 100644 --- a/pos_restrict_product_stock/static/src/js/ProductScreen.js +++ b/pos_restrict_product_stock/static/src/js/ProductScreen.js @@ -8,7 +8,7 @@ import { _t } from "@web/core/l10n/translation"; patch(PosStore.prototype, { async addProductToCurrentOrder(...args) { const product = args[0]; - if (product.detailed_type === 'service'|| product.uom_id[1]=="kg") { + if (product.detailed_type === 'service'|| product.to_weight) { return super.addProductToCurrentOrder(...args); } const type = this.config.stock_type;