From c693ccc62c5dae723db18cd8a925d6a09336959f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 24 Oct 2023 11:50:00 +0200 Subject: [PATCH] pos_usability: add patch "pos-always_open_cashbox.diff" --- pos_usability/pos-always_open_cashbox.diff | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pos_usability/pos-always_open_cashbox.diff diff --git a/pos_usability/pos-always_open_cashbox.diff b/pos_usability/pos-always_open_cashbox.diff new file mode 100644 index 0000000..6d0bf3d --- /dev/null +++ b/pos_usability/pos-always_open_cashbox.diff @@ -0,0 +1,15 @@ +diff --git a/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js b/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js +index e8ddb4d173c..684be2484a2 100644 +--- a/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js ++++ b/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js +@@ -190,7 +190,9 @@ odoo.define('point_of_sale.PaymentScreen', function (require) { + } + } + async _finalizeValidation() { +- if ((this.currentOrder.is_paid_with_cash() || this.currentOrder.get_change()) && this.env.pos.config.iface_cashdrawer && this.env.proxy && this.env.proxy.printer) { ++ //if ((this.currentOrder.is_paid_with_cash() || this.currentOrder.get_change()) && this.env.pos.config.iface_cashdrawer && this.env.proxy && this.env.proxy.printer) { ++ // Always open cashbox (by default, Odoo only opens cashbox for cash payments) ++ if (this.env.pos.config.iface_cashdrawer && this.env.proxy && this.env.proxy.printer) { + this.env.proxy.printer.open_cashbox(); + } +