Commit Graph

12 Commits

Author SHA1 Message Date
f9a8358e95 [IMP] docuseal_signing: add unit tests for API payload and server action
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m28s
tests / test (pull_request) Successful in 51s
Cover with a mocked Docuseal API (shared ``DocusealApiMockMixin``
capturing every request):

- field value conversion matrix in ``_create_submissions``: char,
  selection label, many2one/many2many display names, date formatting,
  empty value left editable while set values are locked
- payload structure and one-submission-per-partner behavior
- draft submissions created with ``send_email`` disabled
- API URL trailing slash stripped
- server action creation is idempotent

Assisted-By: GLM-5.3-Flash
2026-11-09 15:39:26 +01:00
5050219d8c [FIX] docuseal_signing: clean up server action and translate notifications
- Deleting a ``docuseal.template`` now removes its generated contextual
  server action; an orphaned action would browse a deleted template at
  runtime and crash.
- The display notification strings are wrapped in ``_()`` so they are
  translatable, with their French translations in the catalog.
- Add a short manifest description so the Apps page renders plain text
  instead of parsing the markdown README as reStructuredText.

Covered by a unit test on the template deletion lifecycle.

Assisted-By: GLM-5.3-Flash
2026-11-09 15:39:26 +01:00
77d556c14a [IMP] docuseal_signing: keep the Docuseal field order in the mapping
Fields are now ordered as returned by the Docuseal API: a sequence
field (reorderable with drag & drop) is written by
``action_fetch_fields`` according to the API field order, so deleting
a mapping line and re-fetching restores the original order instead of
appending it at the end.

Also refresh the French catalog (new Sequence field, new help texts,
stale smart_search entries dropped).

Covered by a unit test reproducing the delete-then-refetch scenario.

Assisted-By: GLM-5.3-Flash
2026-11-09 15:39:26 +01:00
b3d0f4b0d3 [FIX] docuseal_signing: keep partner field mappings on fields fetch
``action_fetch_fields`` wiped the whole ``field_ids`` mapping on every
fetch, dropping the res.partner fields configured by the administrator.
Reconcile instead: keep existing mappings untouched, add fields new to
the Docuseal template and drop the ones removed from it.

Covered by unit tests running against a mocked Docuseal API.

Assisted-By: GLM-5.3-Flash
2026-11-09 15:39:26 +01:00
424ce6beee [IMP] docuseal_signing: add README and drop unused signature helper
Add the module README documenting purpose, features (template
registry, field mapping, contextual server action, settings) and
installation requirements.

Remove ``res.partner#request_docuseal_signature``, which was introduced
as a public entry point for other code but was never called: the
generated server action calls ``docuseal.template._create_submissions``
directly. The template method is now the single entry point for
signature requests.

Assisted-By: GLM-5.3-Flash
2026-11-09 15:39:26 +01:00
abbf44cab7 [FIX] docuseal_signing: send labels of relational and selection fields
Pre-filled values were converted with str(), so a Many2one such as the
partner title was sent as "res.partner.title(5,)" and a selection field
as its technical key. Send the display name of relational fields and the
label of selection fields instead.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:39:26 +01:00
de53394c0c [FIX] docuseal_signing: strip trailing slash from Docuseal API URL
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:39:26 +01:00
593db7c31e [IMP] docuseal_signing : make pre-filled fields read-only for the signer
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:39:26 +01:00
9215ad7822 [IMP] docuseal_signing : create draft submissions without sending the signature request
_create_submissions gets a send_email parameter (default True, so the
"Request signature" contextual action is unchanged), passed to the Docuseal
API. It now returns the Docuseal response of each created submission
(submitter id, slug, submission_id...) so callers can build a link to it.

New _create_draft_submissions helper: creates pre-filled submissions with
send_email=False, to be reviewed then sent for signature from Docuseal.

Also adds help texts on template_id and submitter_role.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:39:26 +01:00
ef13329285 [IMP] docuseal_signing: update the icone to be docuseal logo 2026-11-09 15:39:26 +01:00
aecef0daea [IMP] docuseal_signing : function request_docuseal_signature on res.partner model 2026-11-09 15:39:26 +01:00
20099e1c78 [ADD] docuseal_siging: ask for docuseal signature from odoo 2026-11-09 15:39:25 +01:00