You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
682 B
25 lines
682 B
/** @odoo-module */
|
|
import { patch } from "@web/core/utils/patch";
|
|
import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad";
|
|
|
|
//Patching ActionpadWidget to disable customer and payment
|
|
patch(ActionpadWidget.prototype, {
|
|
setup() {
|
|
super.setup();
|
|
},
|
|
disable_customer() {
|
|
if (this.pos.cashier?.disable_customer) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
disable_payment() {
|
|
console.log(this.pos.cashier?.disable_customer)
|
|
if (this.pos.cashier?.disable_payment) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|