Browse Source

Nov 27: [FIX] Bug Fixed 'pos_restrict_product_stock'

pull/331/merge
Risvana Cybro 3 weeks ago
parent
commit
795c912a19
  1. 4
      pos_restrict_product_stock/doc/RELEASE_NOTES.md
  2. 3
      pos_restrict_product_stock/static/src/js/OrderScreen.js
  3. 2
      pos_restrict_product_stock/static/src/js/ProductScreen.js

4
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 #### 05.11.2025
#### Version 17.0.2.1.2 #### Version 17.0.2.1.2
#### Update #### Update
Service products and products measured in kilograms with “To Weigh in Scale” enabled are now excluded from Service products and products measured “To Weigh in Scale” enabled are now excluded from
restricts stock availability check in POS. restricts stock availability check in POS.

3
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)) { for (const { product, total_qty, name } of Object.values(productQuantities)) {
if (product.detailed_type === 'service'|| product.uom_id[1]=="kg") { if (product.detailed_type === 'service'|| product.to_weight) {
console.log(product.type)
continue; continue;
} }
if (is_restrict) { if (is_restrict) {

2
pos_restrict_product_stock/static/src/js/ProductScreen.js

@ -8,7 +8,7 @@ import { _t } from "@web/core/l10n/translation";
patch(PosStore.prototype, { patch(PosStore.prototype, {
async addProductToCurrentOrder(...args) { async addProductToCurrentOrder(...args) {
const product = args[0]; 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); return super.addProductToCurrentOrder(...args);
} }
const type = this.config.stock_type; const type = this.config.stock_type;

Loading…
Cancel
Save