[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#81546 X-original-commit: 2e10f33511ced41f296e0f65d2d042f4e041cacb Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com> Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -81,8 +81,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;
|
||||
|
||||
Reference in New Issue
Block a user