Skip to content

[T3409] Interaction resume - #2154

Open
AlexandrePhilibert wants to merge 4 commits into
18.0from
T3409-interaction-resume
Open

AlexandrePhilibert wants to merge 4 commits into
18.0from
T3409-interaction-resume

Conversation

@AlexandrePhilibert

@AlexandrePhilibert AlexandrePhilibert commented Sep 11, 2026

Copy link
Copy Markdown

Correctly update existing resume entries, add a tours test and improve the UX.

Linked to CompassionCH/compassion-switzerland#1821.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Greptile has paused reviews on this repository — it used its 100 free open-source review credits for this billing period. Reviews resume automatically on September 13. To continue before then, an organization admin can keep reviews running past the free credits — those bill as normal usage.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It rewrites core interaction-resume dedup/update logic and changes cross-module field types, so it needs human verification beyond the one translation-mismatch issue found.

Pull request overview

This PR improves the "interaction resume" feature so that re-fetching a contact's interactions updates existing resume entries in place instead of clearing and recreating them, and it hardens the surrounding UX. It also fixes address rendering for thank-you letters/emails and prevents sending communications that have no send mode. A large end-to-end tour test suite is added. This ties into CompassionCH/compassion-switzerland#1821.

Changes:

  • Rewrote interaction.resume.create to deduplicate via a per-source _identity/_interaction_discriminator and update existing entries, plus a refresh_interactions that re-fetches all loaded pages without wiping them.
  • Simplified the log-interaction wizard (persist attachments by reassigning them, show a success notification instead of a temporary chatter note) and blocked sending a communication with no send mode (Python guard + dedicated button + translations).
  • Made short_address/new address_without_name proper Html fields so line breaks render, and added JS tour tests (with eslint globals) covering interactions, calls and communications.
File summaries
File Description
interaction_resume/models/interaction_resume.py Identity-based dedup and in-place update of resume entries on create
interaction_resume/models/abstract_interaction_source.py Base _interaction_discriminator hook (empty by default)
interaction_resume/models/crm_request.py Claim discriminator on (date, subject) for multi-entry sources
interaction_resume/models/crm_phonecall.py Adds has_attachment to phone call resume data
interaction_resume/models/other_interaction.py Adds has_attachment; refresh (not reset) on write, guarded by _transient
interaction_resume/models/res_partner.py New refresh_interactions re-fetching every loaded page
interaction_resume/wizards/partner_log_other_interaction_wizard.py Persist attachments by reassignment; return success notification
interaction_resume/views/interaction_resume.xml Recolored list decorations by direction/type
interaction_resume/manifest.py Registers tour test asset bundle
interaction_resume/static/tests/tours/interaction_resume.js New tours for interactions, calls, communications
interaction_resume/tests/*.py New HttpCase tour tests
partner_communication/models/communication_job.py Blocks sending jobs without a send mode
partner_communication/views/communication_job_view.xml Adds "Send Now" button for no-send-mode jobs with tooltip
partner_communication/i18n/{de,fr_CH,it}.po Translations for the new send-mode messages
thankyou_letters/models/res_partner.py short_address/address_without_name as Html; refactored compute
thankyou_letters/tests/test_partner_address.py Tests address markup/line-break rendering
eslint.config.cjs Applies module config + browser globals to all .js
Review details
  • Files reviewed: 21/21 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

self = self.with_context(queue_job__no_delay=True)
if self.state == "pending" and not self.send_mode:
raise UserError(
_("This communication has no send mode, so it cannot be sent.")
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.

2 participants