odoo/odoo#187727
Created by Bugfix, Kawtar Drissi El Bouzaidi (kdeb)
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:16.0-OPW-4076246-point_of_sale_deduct_change_from_cash_payments-kdeb
- head
- 128fdc2e751ee7ff983fdb22afc117adb9310879
- merged
- 8 months ago by POS IoT, Joseph Caburnay (jcb)
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 |
[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.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr