From 7dcb57181e471a65d1b01a761696e89da64f6014 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Thu, 3 Jun 2021 21:11:15 +0000 Subject: [PATCH] [FIX] point_of_sale: correct payment method when price updated When the selected payment line is updated but is in state 'paid', it adds a new line with the first payment method. Since we load more payment methods than the ones in the pos config, we should only take the ones that are on the pos config closes odoo/odoo#71736 X-original-commit: 8e7739fd2299246e963e8da3f4c53b699b84c1eb Signed-off-by: pimodoo --- .../static/src/js/Screens/PaymentScreen/PaymentScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5aa8e2f9d14..32ed47e058a 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 @@ -75,7 +75,7 @@ odoo.define('point_of_sale.PaymentScreen', function (require) { } _updateSelectedPaymentline() { if (this.paymentLines.every((line) => line.paid)) { - this.currentOrder.add_paymentline(this.env.pos.payment_methods[0]); + this.currentOrder.add_paymentline(this.payment_methods_from_config[0]); } 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