Skip to content
Snippets Groups Projects
Commit b45f75a3 authored by roen-odoo's avatar roen-odoo
Browse files

[FIX] point_of_sale: remove 0€ payment line of orders


Current behavior:
When an order contains a payment line with 0€, and a customer account
payment line. Then you close the PoS and invoice the order from an other
PoS session, you get an error.

Steps to reproduce:
- Open PoS, make a new order with a payment line of 0€ and a customer
  account payment line.
- Close the session and open a new one.
- Go in the paid order, and try to invoice it.
- You get an error.

Fix:
To fix the issue we just remove the useless 0€ payment line.

opw-3477486

closes odoo/odoo#134702

Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
parent 64530065
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,11 @@ odoo.define('point_of_sale.PaymentScreen', function (require) {
}
this.currentOrder.initialize_validation_date();
for (let line of this.paymentLines) {
if (!line.amount === 0) {
this.currentOrder.remove_paymentline(line);
}
}
this.currentOrder.finalized = true;
let syncOrderResult, hasError;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment