odoo/odoo#207366

Created by Platform, Xavier Alt (xal)
Closed
label
odoo-dev:18.0-do-not-send-move-on-peppol-if-company-not-registered-xal
head
e75fe218a2580986ef30f4fd72cad5e6c99e48a2
odoo/odoo
18.0 #207366

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

Use case:

=> 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