diff --git a/pos_access_right_hr/__manifest__.py b/pos_access_right_hr/__manifest__.py index 223ab766a..447ba788a 100644 --- a/pos_access_right_hr/__manifest__.py +++ b/pos_access_right_hr/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': 'POS Access Right', - 'version': '17.0.2.1.2', + 'version': '17.0.2.1.4', "category": 'Point of Sale', 'summary': 'To Restrict POS features for cashiers', 'description': 'This app allows you to enable or disable POS features ' @@ -30,7 +30,7 @@ 'company': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions', 'website': 'https://www.cybrosys.com/', - 'depends': ['pos_hr'], + 'depends': ['point_of_sale','pos_hr', 'pos_restaurant'], 'data': [ 'views/hr_employee_views.xml', ], @@ -39,7 +39,7 @@ 'pos_access_right_hr/static/src/js/PosStore.js', 'pos_access_right_hr/static/src/js/ActionpadWidget.js', 'pos_access_right_hr/static/src/js/ProductScreen.js', - 'pos_access_right_hr/static/src/xml/ActionpadWidget.xml' + 'pos_access_right_hr/static/src/xml/ActionpadWidget.xml', ], }, 'images': ['static/description/banner.jpg'], diff --git a/pos_access_right_hr/doc/RELEASE_NOTES.md b/pos_access_right_hr/doc/RELEASE_NOTES.md index 96e012f21..a807f6dac 100644 --- a/pos_access_right_hr/doc/RELEASE_NOTES.md +++ b/pos_access_right_hr/doc/RELEASE_NOTES.md @@ -20,3 +20,8 @@ #### Version 17.0.2.1.3 ##### BUG_FIX - Bug fix: POS Restaurant session failed to load correctly. + +#### 10.09.2025 +#### Version 17.0.2.1.4 +##### BUG_FIX +- Bug fix: Updated module with restricted keyboard events. diff --git a/pos_access_right_hr/static/src/img/download.png b/pos_access_right_hr/static/src/img/download.png new file mode 100644 index 000000000..b89355f61 Binary files /dev/null and b/pos_access_right_hr/static/src/img/download.png differ diff --git a/pos_access_right_hr/static/src/js/ProductScreen.js b/pos_access_right_hr/static/src/js/ProductScreen.js index fb9ac350b..4283ec601 100644 --- a/pos_access_right_hr/static/src/js/ProductScreen.js +++ b/pos_access_right_hr/static/src/js/ProductScreen.js @@ -25,16 +25,30 @@ patch(ProductScreen.prototype, { { value: "-", text: "+/-", disabled: this.pos.cashier?.disable_plus_minus }, { value: "0", disabled: this.pos.cashier?.disable_numpad }, { value: this.env.services.localization.decimalPoint, disabled: this.pos.cashier?.disable_numpad }, -// Unicode: https://www.compart.com/en/unicode/U+232B { value: "Backspace", text: "⌫", disabled: this.pos.cashier?.disable_remove_button }, ].map((button) => ({ ...button, class: this.pos.numpadMode === button.value ? "active border-primary" : "", })); }, + + async updateSelectedOrderline({ buffer, key }) { + const cashier = this.pos?.cashier; + if (key === '-' && cashier?.disable_plus_minus) { + return; // Block minus key + } else if (key === '+' && cashier?.disable_plus_minus) { + return; // Block + key + } + else if (key === 'Backspace' && cashier?.disable_remove_button) { + return; // Block remove/backspace key + } else if (/^[0-9]$/.test(key) && cashier?.disable_numpad) { + return; // Block numpad input + } + return super.updateSelectedOrderline({ buffer, key }); + }, + disable_payment() { if (this.pos.cashier?.disable_payment) { - return true; } else { return false; diff --git a/pos_access_right_hr/static/src/xml/ActionpadWidget.xml b/pos_access_right_hr/static/src/xml/ActionpadWidget.xml index c86d3d5f4..041c2450e 100644 --- a/pos_access_right_hr/static/src/xml/ActionpadWidget.xml +++ b/pos_access_right_hr/static/src/xml/ActionpadWidget.xml @@ -1,20 +1,47 @@ - - - - disable_payment() - - - disable_customer() - - - + disable_payment() + + + +
+ + + +
+
+