Skip to content

[FIX] point_of_sale: do not swap accounts for outbound payments#263169

Closed
fw-bot wants to merge 1 commit intoodoo:saas-18.3from
odoo-dev:saas-18.3-18.0-opw-6044883-reverse_journals_for_refund-aksi-524128-fw
Closed

[FIX] point_of_sale: do not swap accounts for outbound payments#263169
fw-bot wants to merge 1 commit intoodoo:saas-18.3from
odoo-dev:saas-18.3-18.0-opw-6044883-reverse_journals_for_refund-aksi-524128-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Contributor

@fw-bot fw-bot commented May 6, 2026

Step to reproduce:

  • we need a session, where in total, we gave out money (when we refund)
  • for this, start a pos session, do a order, pay using bank and close session
  • restart the pos, refund the order, and pay using bank, close it.
  • go to accounting > customer > payment
  • open payment for both session

Observation:

  • in journal entries for both payment, amount is credit into
    account_receivable and debit from outstanding account

Cause:

  • commit[1] swaps accounts when we have outbound payments, which is functionally
    incorrect and lead to this issue.
    [1] 844d296

Fix:

  • do not swap accounts between outstanding and destination accounts.

Expected after fix:

  • Inbound and outbound payments use the same accounts
  • Journal entries are correct:
  • Inbound: debit outstanding, credit account_receivable
  • Outbound: reverse of inbound entries

opw-6044883

Forward-Port-Of: #256258

Step to reproduce:
- we need a session, where in total, we gave out money (when we refund)
- for this, start a pos session, do a order, pay using bank and close session
- restart the pos, refund the order, and pay using bank, close it.
- go to accounting > customer > payment
- open payment for both session

Observation:
- in journal entries for both payment, amount is credit into
`account_receivable` and debit from `outstanding account`

Cause:
- commit[1] swaps accounts when we have outbound payments, which is functionally
incorrect and lead to this issue.
[1] odoo@844d296

Fix:
- do not swap accounts between `outstanding` and `destination` accounts.

Expected after fix:
- Inbound and outbound payments use the same accounts
- Journal entries are correct:
- Inbound: debit outstanding, credit account_receivable
- Outbound: reverse of inbound entries

opw-6044883

X-original-commit: 331acbb
@robodoo
Copy link
Copy Markdown
Contributor

robodoo commented May 6, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Contributor Author

fw-bot commented May 6, 2026

This PR targets saas-18.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 6, 2026
robodoo pushed a commit that referenced this pull request May 8, 2026
Step to reproduce:
- we need a session, where in total, we gave out money (when we refund)
- for this, start a pos session, do a order, pay using bank and close session
- restart the pos, refund the order, and pay using bank, close it.
- go to accounting > customer > payment
- open payment for both session

Observation:
- in journal entries for both payment, amount is credit into
`account_receivable` and debit from `outstanding account`

Cause:
- commit[1] swaps accounts when we have outbound payments, which is functionally
incorrect and lead to this issue.
[1] 844d296

Fix:
- do not swap accounts between `outstanding` and `destination` accounts.

Expected after fix:
- Inbound and outbound payments use the same accounts
- Journal entries are correct:
- Inbound: debit outstanding, credit account_receivable
- Outbound: reverse of inbound entries

opw-6044883

closes #263169

X-original-commit: 331acbb
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Ajit Kumar  Krishnanand Singh (aksi) <aksi@odoo.com>
@robodoo robodoo closed this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants