[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 <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user