Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 20, 2025

  • Configure a payment method (e.g. "demo") with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment.
  • Create a partner on the website using an incognito window. In the backend change their default property_account_receivable_id. Assign them a fiscal position where the receivable account is mapped to another account.
  • Make a purchase using the "demo" payment method with the new partner.

The generated invoice and its corresponding journal entry do not share the same account_id (Account Receivable).

The invoice uses the account_id computed in _compute_account_id of account.move.line, which is not necessarily the same as the account_id set on the partner.

After this commit, the payment uses the same account_id as the related invoice, (same as _create_payment_vals_from_wizard) avoiding any discrepancy.

opw-4669927

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


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

Forward-Port-Of: #209318
Forward-Port-Of: #204489

…entry account_id

- Configure a payment method (e.g. `"demo"`) with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment.
- Create a partner on the website using an incognito window. In the backend change their default property_account_receivable_id. Assign them a fiscal position where the receivable account is mapped to another account.
- Make a purchase using the `"demo"` payment method with the new partner.

The generated invoice and its corresponding journal entry do not share the same `account_id` (Account Receivable).

The invoice uses the `account_id` computed in `_compute_account_id` of `account.move.line`, which is not necessarily the same as the `account_id` set on the partner.

After this commit, the payment uses the same `account_id` as the related invoice, (same as _create_payment_vals_from_wizard)  avoiding any discrepancy.

opw-4669927

X-original-commit: 1efbb52
@robodoo
Copy link
Contributor

robodoo commented May 20, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented May 20, 2025

This PR targets saas-18.2 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 20, 2025
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 20, 2025
@gteboul
Copy link
Contributor

gteboul commented May 20, 2025

@robodoo r+

robodoo pushed a commit that referenced this pull request May 20, 2025
…entry account_id

- Configure a payment method (e.g. `"demo"`) with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment.
- Create a partner on the website using an incognito window. In the backend change their default property_account_receivable_id. Assign them a fiscal position where the receivable account is mapped to another account.
- Make a purchase using the `"demo"` payment method with the new partner.

The generated invoice and its corresponding journal entry do not share the same `account_id` (Account Receivable).

The invoice uses the `account_id` computed in `_compute_account_id` of `account.move.line`, which is not necessarily the same as the `account_id` set on the partner.

After this commit, the payment uses the same `account_id` as the related invoice, (same as _create_payment_vals_from_wizard)  avoiding any discrepancy.

opw-4669927

closes #210756

X-original-commit: 1efbb52
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Signed-off-by: Guillaume Teboul-Tornezy (gute) <gute@odoo.com>
@robodoo robodoo closed this May 20, 2025
@fw-bot fw-bot deleted the saas-18.2-17.0-opw-4669927-portal_user_account_localisation_invoice_journal_item-gute-437238-fw branch May 27, 2025 14:56
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 OE the report is linked to a support ticket (opw-...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants