Browse Source

:Dec 15 [FIX] Bug Fixed 'pos_restrict_product_stock'

pull/299/merge
Risvana Cybro 3 days ago
parent
commit
df0abcda44
  1. 2
      pos_restrict_product_stock/__manifest__.py
  2. 8
      pos_restrict_product_stock/doc/RELEASE_NOTES.md
  3. 8
      pos_restrict_product_stock/static/src/js/ProductScreen.js

2
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",

8
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.
- 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.

8
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;

Loading…
Cancel
Save