Skip to content
Snippets Groups Projects
Commit 2e10f335 authored by Florent de Labarre's avatar Florent de Labarre
Browse files

[FIX] point_of_sale : allow edit to amount on done payment after reload


When you reload the pos (F5), this.payment_terminal is undefined.
And you can update the amount even if the payment is done.

closes odoo/odoo#72218

Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
parent 1ad7986d
Branches
Tags
No related merge requests found
......@@ -80,8 +80,9 @@ odoo.define('point_of_sale.PaymentScreen', function (require) {
}
if (!this.selectedPaymentLine) return; // do nothing if no selected payment line
// disable changing amount on paymentlines with running or done payments on a payment terminal
const payment_terminal = this.selectedPaymentLine.payment_method.payment_terminal;
if (
this.payment_interface &&
payment_terminal &&
!['pending', 'retry'].includes(this.selectedPaymentLine.get_payment_status())
) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment