Skip to content

[FIX] account_peppol: don't suggest sending on PEPPOL if company not registered - #207366

Closed
xavieralt wants to merge 1 commit into
odoo:18.0from
odoo-dev:18.0-do-not-send-move-on-peppol-if-company-not-registered-xal
Closed

[FIX] account_peppol: don't suggest sending on PEPPOL if company not registered#207366
xavieralt wants to merge 1 commit into
odoo:18.0from
odoo-dev:18.0-do-not-send-move-on-peppol-if-company-not-registered-xal

Conversation

@xavieralt

Copy link
Copy Markdown
Contributor

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.


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

…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.
@robodoo

robodoo commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@C3POdoo
C3POdoo requested a review from a team April 24, 2025 21:00
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 24, 2025
@C3POdoo
C3POdoo requested review from aboo-odoo and removed request for a team April 24, 2025 21:00
@aboo-odoo
aboo-odoo requested review from a team and jorenvo and removed request for a team and aboo-odoo April 25, 2025 08:41

@jorenvo jorenvo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good! I'll let the team know this is ready for final review.

@pmax-x

pmax-x commented Apr 28, 2025

Copy link
Copy Markdown

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.
We'll make sure to fix this issue.

@pmax-x pmax-x closed this Apr 28, 2025
@fw-bot
fw-bot deleted the 18.0-do-not-send-move-on-peppol-if-company-not-registered-xal branch May 5, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants