[FIX] docuseal_signing: harden template copies, API errors and emails
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m31s
tests / test (pull_request) Successful in 52s

- Do not copy the contextual action nor the submitter role with a
  template: a copy sharing the action would rewrite or delete the
  original's.
- Make the template ID read-only once fetched from Docuseal: another
  Docuseal template needs a new entry.
- Report an invalid API URL or token, an unexpected (non-JSON) response
  and a connection dropped mid-response as a readable UserError.
- Refuse to email a signature request to contacts without a valid email
  address (email_normalize), before any call to Docuseal.
- Stop logging the field values and the Docuseal response, which hold
  personal data and the signing links.
- Prevent adding mapping lines by hand: they come from Docuseal only.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 17:35:19 +01:00
parent 87653552b1
commit fddc2e5c4b
7 changed files with 238 additions and 27 deletions

View File

@@ -235,11 +235,14 @@ msgstr "ID du template"
#. module: docuseal_signing
#: model:ir.model.fields,help:docuseal_signing.field_docuseal_template__template_id
msgid ""
"You can find the template id in the URL when you have selected the template "
"in Docuseal."
"You can find the template id in the URL when you have selected the "
"template in Docuseal. It cannot be changed once fetched from Docuseal: to "
"use another template, create a new entry."
msgstr ""
"Vous trouverez l'identifiant du template dans l'URL après avoir sélectionné "
"le template dans Docuseal."
"le template dans Docuseal. Il ne peut plus être modifié une fois rapatrié "
"depuis Docuseal : pour utiliser un autre template, veuillez créer une "
"nouvelle entrée."
#. module: docuseal_signing
#: model:ir.model.fields,field_description:docuseal_signing.field_docuseal_template_field__partner_field_id
@@ -341,3 +344,39 @@ msgstr "Signature demandée"
#: code:addons/docuseal_signing/models/docuseal_template.py:0
msgid "The signature request has been sent to %(partner)s."
msgstr "La demande de signature a été envoyée à %(partner)s."
#. module: docuseal_signing
#. odoo-python
#: code:addons/docuseal_signing/models/docuseal_template.py:0
msgid "The Docuseal API URL %(url)s is invalid: %(error)s"
msgstr "L'URL de l'API Docuseal %(url)s est invalide : %(error)s"
#. module: docuseal_signing
#. odoo-python
#: code:addons/docuseal_signing/models/docuseal_template.py:0
msgid ""
"Docuseal returned an unexpected response from %(url)s. "
"Check the Docuseal API URL in the General Settings."
msgstr ""
"Docuseal a renvoyé une réponse inattendue depuis %(url)s. Vérifiez "
"l'URL de l'API Docuseal dans les Paramètres généraux."
#. module: docuseal_signing
#. odoo-python
#: code:addons/docuseal_signing/models/docuseal_template.py:0
msgid ""
"The signature request cannot be emailed to contacts "
"without a valid email address: %(partners)s"
msgstr ""
"La demande de signature ne peut pas être envoyée par e-mail aux contacts "
"sans adresse e-mail valide : %(partners)s"
#. module: docuseal_signing
#. odoo-python
#: code:addons/docuseal_signing/models/docuseal_template.py:0
msgid ""
"The request to Docuseal could not be sent: %(error)s. "
"Check the Docuseal API token in the General Settings."
msgstr ""
"La requête vers Docuseal n'a pas pu être envoyée : %(error)s. "
"Vérifiez le token API Docuseal dans les Paramètres généraux."