Skip to content

Commit

Permalink
[FW][FIX] point_of_sale: Open cashdrawer with change
Browse files Browse the repository at this point in the history
We should open the cashdrawer when paying with a non cash payment
method if change should be returned to the customer.

Use case: The customer wants to pay 10€ more with his card to get 10€
in cash in return.

closes odoo#65331

Taskid: 2449312
X-original-commit: c324c02
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
  • Loading branch information
aprieels committed Feb 1, 2021
1 parent 0a50436 commit bd4ed3b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ odoo.define('point_of_sale.PaymentScreen', function (require) {
}
}
async _finalizeValidation() {
if (this.currentOrder.is_paid_with_cash() && this.env.pos.config.iface_cashdrawer) {
if ((this.currentOrder.is_paid_with_cash() || this.currentOrder.get_change()) && this.env.pos.config.iface_cashdrawer) {
this.env.pos.proxy.printer.open_cashbox();
}

Expand Down

0 comments on commit bd4ed3b

Please sign in to comment.