[FIX] account_peppol: don't suggest sending on PEPPOL if company not registered - #207366
Closed
xavieralt wants to merge 1 commit into
Closed
Conversation
…registered Use case: - Create an database with eCommerce (`website_sale`) (and for a country where PEPPOL is supported) - Enable `Automatic Invoice` in General Settings. - Configure everything for PEPPOL but do not register the company (Partner have their PEPPOL EAS and Endpoint correctly configured) - Enable a card payment provider - As a customer, buy something from the shop and paid using a card => When post-processing the customer payment (payment.transaction) we will automatically generate and send the invoice; and while trying to send the invoice we will crash with: `ValueError: Expected singleton: account_edi_proxy_client.user()` The reason is that we try to send the invoice to both email and PEPPOL while the company's registration on PEPPOL was not yet be done. This commit ensure we don't suggest sending by default on PEPPOL if the company is not allowed to send on PEPPOL.
Contributor
aboo-odoo
requested review from
a team and
jorenvo
and removed request for
a team and
aboo-odoo
April 25, 2025 08:41
jorenvo
approved these changes
Apr 25, 2025
jorenvo
left a comment
Contributor
There was a problem hiding this comment.
Thank you, looks good! I'll let the team know this is ready for final review.
|
I understand the issue that needs to be fixed. However, this is not the flow that we want, it has been done this way because we want to Peppol to always shows as an option even when not eligible. The idea is to motivate people, as much as possible, to register for Peppol on Odoo and help them reach compliance. |
fw-bot
deleted the
18.0-do-not-send-move-on-peppol-if-company-not-registered-xal
branch
May 5, 2025 06:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use case:
Create an database with eCommerce (
website_sale) (and for a country where PEPPOL is supported)Enable
Automatic Invoicein General Settings.Configure everything for PEPPOL but do not register the company (Partner have their PEPPOL EAS and Endpoint correctly configured)
Enable a card payment provider
As a customer, buy something from the shop and paid using a card
=> When post-processing the customer payment (payment.transaction) we will automatically generate and send the invoice; and while trying to send the invoice we will crash with:
ValueError: Expected singleton: account_edi_proxy_client.user()The reason is that we try to send the invoice to both email and
PEPPOL while the company's registration on PEPPOL was not yet be done.
This commit ensure we don't suggest sending by default on PEPPOL
if the company is not allowed to send on PEPPOL.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr