Browse Source

Feb 06 [UPDT] : Updated 'pos_access_right_hr'

pull/313/merge
AjmalCybro 3 months ago
parent
commit
fb02a61111
  1. 2
      pos_access_right_hr/__manifest__.py
  2. 5
      pos_access_right_hr/doc/RELEASE_NOTES.md
  3. 2
      pos_access_right_hr/static/src/js/ActionpadWidget.js
  4. 8
      pos_access_right_hr/static/src/js/ProductScreen.js
  5. 7
      pos_access_right_hr/static/src/xml/ActionpadWidget.xml

2
pos_access_right_hr/__manifest__.py

@ -21,7 +21,7 @@
################################################################################
{
'name': 'POS Access Right',
'version': '17.0.2.1.1',
'version': '17.0.2.1.2',
"category": 'Point of Sale',
'summary': 'To Restrict POS features for cashiers',
'description': 'This app allows you to enable or disable POS features '

5
pos_access_right_hr/doc/RELEASE_NOTES.md

@ -10,3 +10,8 @@
#### Version 17.0.2.1.1
##### ADD
- Bug fix
#### 17.05.2024
#### Version 17.0.2.1.2
##### BUG_FIX
- Bug fix: Payment button on the tab screen is no longer restricted in portrait mode.

2
pos_access_right_hr/static/src/js/ActionpadWidget.js

@ -15,8 +15,8 @@ patch(ActionpadWidget.prototype, {
}
},
disable_payment() {
console.log(this.pos.cashier?.disable_customer)
if (this.pos.cashier?.disable_payment) {
return true;
} else {
return false;

8
pos_access_right_hr/static/src/js/ProductScreen.js

@ -31,5 +31,13 @@ patch(ProductScreen.prototype, {
...button,
class: this.pos.numpadMode === button.value ? "active border-primary" : "",
}));
},
disable_payment() {
if (this.pos.cashier?.disable_payment) {
return true;
} else {
return false;
}
}
});

7
pos_access_right_hr/static/src/xml/ActionpadWidget.xml

@ -10,4 +10,11 @@
<attribute name="t-att-disabled">disable_customer()</attribute>
</xpath>
</t>
<!-- Inheriting ProductScreen template for adding the button disable feature -->
<t name="pos_access_right_hr.ProductScreen" owl="1"
t-inherit="point_of_sale.ProductScreen" t-inherit-mode="extension">
<xpath expr="//button[hasclass('pay-button')]" position="attributes">
<attribute name="t-att-disabled">disable_payment()</attribute>
</xpath>
</t>
</templates>

Loading…
Cancel
Save