odoo/odoo#194282

Created by fw-bot
Merged at a5651bfad1c86f14692243e878c55cf5765ce547

Statuses:

label
odoo-dev:saas-17.2-16.0-OPW-4076246-point_of_sale_deduct_change_from_cash_payments-kdeb-rwr5-fw
head
13a071998e8a9dbf60802afd2fc2d3dd0fac0ac0
merged
8 months ago by Bugfix, Kawtar Drissi El Bouzaidi (kdeb)
odoo/odoo
16.0 #187727
17.0 #194097
saas-17.2 #194282
saas-17.4 #194284
18.0 #194299
saas-18.1 #194437
saas-18.2
saas-18.3
saas-18.4
19.0
master #194444

[FW][FIX] point_of_sale: deduct change from cash payment

Issue:

when making a payment using 2 different payment methods (cash and bank), the change gets deducted from the bank payment not the cash payment in the invoice.

Steps To Reproduce:

On POS, for an order totaling $120.
- Add a customer and ensure the "Invoice" box is checked.
- pay using two payments methods bank 100$ Cash 50$
- the change is $30, everything looks fine on the ticket on the pos.
- Notice on the invoice on the db backend the $30 change is incorrectly deducted from the bank payment. As a result, the invoice displays: bank : $70 cash: $50

Soltution:
- In the _create_payment_moves method, ensure that cash payment method creates an account.move including the change amount.

opw-4076246


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #194097
Forward-Port-Of: #187727