diff --git a/pos_access_right_hr/__manifest__.py b/pos_access_right_hr/__manifest__.py index 43820c1d6..7ab435ee0 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.1.0.0', + 'version': '17.0.2.1.1', "category": 'Point of Sale', 'summary': 'To Restrict POS features for cashiers', 'description': 'This app allows you to enable or disable POS features ' diff --git a/pos_access_right_hr/doc/RELEASE_NOTES.md b/pos_access_right_hr/doc/RELEASE_NOTES.md index 9dffa10fa..881d2f458 100644 --- a/pos_access_right_hr/doc/RELEASE_NOTES.md +++ b/pos_access_right_hr/doc/RELEASE_NOTES.md @@ -4,3 +4,9 @@ #### Version 17.0.1.0.0 ##### ADD - Initial commit for POS Access Right + + +#### 17.05.2024 +#### Version 17.0.2.1.1 +##### ADD +- Bug fix diff --git a/pos_access_right_hr/static/src/js/ActionpadWidget.js b/pos_access_right_hr/static/src/js/ActionpadWidget.js index d38c33a05..61a86ae68 100644 --- a/pos_access_right_hr/static/src/js/ActionpadWidget.js +++ b/pos_access_right_hr/static/src/js/ActionpadWidget.js @@ -8,14 +8,15 @@ patch(ActionpadWidget.prototype, { super.setup(); }, disable_customer() { - if (this.pos.cashier.disable_customer) { + if (this.pos.cashier?.disable_customer) { return true; } else { return false; } }, disable_payment() { - if (this.pos.cashier.disable_payment) { + console.log(this.pos.cashier?.disable_customer) + if (this.pos.cashier?.disable_payment) { return true; } else { return false; diff --git a/pos_access_right_hr/static/src/js/ProductScreen.js b/pos_access_right_hr/static/src/js/ProductScreen.js index 3b630722b..0c9340e3f 100644 --- a/pos_access_right_hr/static/src/js/ProductScreen.js +++ b/pos_access_right_hr/static/src/js/ProductScreen.js @@ -10,23 +10,23 @@ patch(ProductScreen.prototype, { }, getNumpadButtons() { return [ - { value: "1", disabled: this.pos.cashier.disable_numpad }, - { value: "2", disabled: this.pos.cashier.disable_numpad }, - { value: "3", disabled: this.pos.cashier.disable_numpad }, - { value: "quantity", text: "Qty", disabled: this.pos.cashier.disable_qty }, - { value: "4", disabled: this.pos.cashier.disable_numpad }, - { value: "5", disabled: this.pos.cashier.disable_numpad }, - { value: "6", disabled: this.pos.cashier.disable_numpad }, - { value: "discount", text: "% Disc", disabled: !this.pos.config.manual_discount || this.pos.cashier.disable_discount }, - { value: "7", disabled: this.pos.cashier.disable_numpad }, - { value: "8", disabled: this.pos.cashier.disable_numpad }, - { value: "9", disabled: this.pos.cashier.disable_numpad }, - { value: "price", text: "Price", disabled: !this.pos.cashierHasPriceControlRights() || this.pos.cashier.disable_price }, - { 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 }, + { value: "1", disabled: this.pos.cashier?.disable_numpad }, + { value: "2", disabled: this.pos.cashier?.disable_numpad }, + { value: "3", disabled: this.pos.cashier?.disable_numpad }, + { value: "quantity", text: "Qty", disabled: this.pos.cashier?.disable_qty }, + { value: "4", disabled: this.pos.cashier?.disable_numpad }, + { value: "5", disabled: this.pos.cashier?.disable_numpad }, + { value: "6", disabled: this.pos.cashier?.disable_numpad }, + { value: "discount", text: "% Disc", disabled: !this.pos.config?.manual_discount || this.pos.cashier?.disable_discount }, + { value: "7", disabled: this.pos.cashier?.disable_numpad }, + { value: "8", disabled: this.pos.cashier?.disable_numpad }, + { value: "9", disabled: this.pos.cashier?.disable_numpad }, + { value: "price", text: "Price", disabled: !this.pos.cashierHasPriceControlRights() || this.pos.cashier?.disable_price }, + { 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 }, + { value: "Backspace", text: "⌫", disabled: this.pos.cashier?.disable_remove_button }, ].map((button) => ({ ...button, class: this.pos.numpadMode === button.value ? "active border-primary" : "", diff --git a/pos_access_right_hr/static/src/xml/ActionpadWidget.xml b/pos_access_right_hr/static/src/xml/ActionpadWidget.xml index e5bcf896b..046dc9b8a 100644 --- a/pos_access_right_hr/static/src/xml/ActionpadWidget.xml +++ b/pos_access_right_hr/static/src/xml/ActionpadWidget.xml @@ -3,43 +3,11 @@ - -
- - - -
+ + disable_payment() + + + disable_customer()