Skip to content

[18.0][ADD] sign_oca_order: sequential signing and CC recipients#151

Open
manana2520 wants to merge 2 commits intoOCA:18.0from
keboola:18.0-add-sign_oca_order
Open

[18.0][ADD] sign_oca_order: sequential signing and CC recipients#151
manana2520 wants to merge 2 commits intoOCA:18.0from
keboola:18.0-add-sign_oca_order

Conversation

@manana2520
Copy link

Summary

Adds sequential (ordered) signing and CC recipient functionality to OCA Sign, similar to DocuSign's routing and carbon copy features.

Note: This PR depends on #150 (sign_oca_reminder) being merged first, as sign_oca_order extends reminder functionality for sequential-aware reminder behavior.

Features

  • Sequential Signing Mode: Signers are ordered by a signing_order field. Only the current step's signers are notified; others wait.
  • Parallel Groups: Signers with the same order number sign simultaneously within that step.
  • CC Recipients: Partners who receive an email with the signed PDF attached after all signers complete.
  • Signer Status Tracking: Each signer progresses through draft -> waiting -> sent -> signed states.
  • Portal "Waiting" Page: Signers who aren't yet current in the sequence see a "please wait" page instead of the signing form.
  • Sequential-Aware Reminders: Reminders only go to the current signing step's unsigned signers (not future steps).
  • Signed Copy Distribution: After all signers complete, each signer receives a copy of the signed document.

Technical Details

  • Extends sign.oca.request with: signing_mode (parallel/sequential), cc_partner_ids, current_signing_order
  • Extends sign.oca.request.signer with: signing_order, signer_state (draft/waiting/sent/signed)
  • Extends sign.oca.request.log with new actions: advance_step, cc_notify
  • Overrides portal controller to show "waiting" page for non-current signers
  • Overrides _cron_send_reminders for sequential awareness
  • Depends on sign_oca and sign_oca_reminder

Test Coverage

42 test cases across 3 test files:

  • test_sequential_signing.py: Step advancement, notification flow, signer state transitions, edge cases
  • test_parallel_mode.py: Default mode behavior, all-at-once sending, CC with parallel
  • test_cc_recipients.py: CC notification after completion, multiple CC recipients, no CC case

Signing Flow

Sequential Mode:
  Order 1: Alice, Bob  ->  Both notified simultaneously
  Order 2: Carol       ->  Notified only after Alice AND Bob sign
  Order 3: Dave        ->  Notified only after Carol signs
  CC: Eve, Frank       ->  Receive signed PDF after Dave signs

Parallel Mode (default):
  All signers notified at once (existing behavior preserved)

Migration Notes

  • No migration scripts needed - this is a new module
  • Default signing mode is "parallel", preserving existing behavior for all current requests

Add DocuSign-like reminder, resend, and expiration functionality
to OCA's sign_oca module.

Features:
- Manual "Resend" button to re-notify unsigned signers
- Automatic reminders via daily cron at configurable intervals
- Request expiration with automatic cancellation
- Company-level defaults in Settings > Sign OCA
- "Expiring Soon" and "Expired" search filters
- Post-init hook to backfill sent_date for existing requests

Tests: 23 test cases covering reminders, expiration, cron behavior,
computed fields, and edge cases.
Add sequential (ordered) signing and CC recipient functionality
to OCA Sign, similar to DocuSign's routing and carbon copy features.

Features:
- Sequential signing mode: signers ordered by signing_order field
- Parallel groups: signers with the same order sign simultaneously
- CC recipients: partners notified with signed PDF after completion
- Signer status tracking: draft -> waiting -> sent -> signed
- Portal 'waiting' page for signers not yet current in sequence
- Sequential-aware reminders (only reminds current step signers)
- Signed document copy sent to all signers after completion

Tests: 42 test cases covering sequential signing, parallel mode,
CC notifications, step advancement, and edge cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant