Skip to content

[fork-CI] [20.0][MIG] web_send_message_popup: Migration to 20.0 - #17

Open
dnplkndll wants to merge 29 commits into
20.0from
20.0-mig-web_send_message_popup
Open

dnplkndll wants to merge 29 commits into
20.0from
20.0-mig-web_send_message_popup

Conversation

@dnplkndll

@dnplkndll dnplkndll commented Oct 1, 2026 •

Copy link
Copy Markdown

Port of web_send_message_popup from 19.0 (OCA/web#3581, unmerged) to 20.0. Follows the OCA migration guide.

No rewriter fired here; all of it is core API drift in mail.

  • Chatter moved package — the 19.0 path does not exist in 20.0, so the patch would never have applied.
  • this.props → this.webChatterProps. Core's chatter now takes props through useProps. The 19.0 this.props.record would be undefined, which fails quietly: the composer opens with no recipients.
  • Re-synced the two methods this module deliberately copies from core's composer. wrapInlinesInBlocks moved onto the html_editor DOM plugin and is no longer exported, and 20.0 added cc routing — without the same split every cc recipient lands in To.

AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.

guewen and others added 28 commits October 1, 2026 16:16
…to open directly the full featured message popup
* Intitial manifest changes

* [FIX] small README tricks
Currently translated at 100.0% (1 of 1 strings)

Translation: web-16.0/web-16.0-web_send_message_popup
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_send_message_popup/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: web-18.0/web-18.0-web_send_message_popup
Translate-URL: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_send_message_popup/sl/
Core reimplements Chatter.toggleComposer in mail/chatter/web/chatter_patch.js
without calling super, so the last patch applied wins outright. Importing that
file for its side effect is what puts this module's override outermost; without
it the patch is silently inert and "Send message" opens the inline composer.

Realigned with 19.0 core:

- toggleComposer: the "message" branch now awaits updateRecipients (new in
  19.0; refreshes suggestedRecipients from unsaved partner/email form edits)
  before opening the wizard, and defers through onThreadCreated when the
  record is unsaved instead of opening against a thread without an id,
  mirroring core's toggle structure.
- context: added clicked_on_full_composer (the wizard otherwise hides the
  followers-only recipients widget and makes the forward-style one required),
  is_thread_composer and body_contains_signature_only; dropped
  mail_post_autofollow, which core removed deliberately in 18.2+.
- default_partner_ids: restored core's filter on partner_id.
- onCloseFullComposerCallback now receives isDiscard. It gained the argument in
  19.0, and reloadParentView() starts with saveRecord(), so discarding a message
  was silently saving the underlying form record.
- formatDefaultBodyForFullComposer: createDocumentFragmentFromContent, the BR
  before the signature, and markup() on return, per core's composer_patch.
- onClose clears replyToMessage, as core does, so a reply context does not leak
  into the next inline composer.
- notifySendFromMailbox delegates to the store method core exposes rather than
  duplicating it and its translatable string.

ROADMAP records that Composer.fullComposerAdditionalContext is not consulted:
the action is built from the chatter, not a rendered composer.

Assisted-by: Claude Opus 5
Assisted-by: Claude Fable 5
Drives the "Send message" button rather than calling openFullComposer()
directly, so the patched toggleComposer is actually exercised. The previous
shape reached the module by a path no user takes and passed while the module
was inert.

Also gates the two paths that had no coverage: that "Log note" still falls
through to core's inline composer, and that isDiscard decides whether the
parent record is reloaded. Both verified by mutation — reverting either fix
fails exactly its own test.

Assisted-by: Claude Opus 5
@dnplkndll
dnplkndll force-pushed the 20.0-mig-web_send_message_popup branch from 1b867f6 to fa17bf2 Compare October 1, 2026 23:28
* Chatter moved to @mail/chatter/web_portal_project/chatter.
* Core reads props via useProps: this.props.record -> this.webChatterProps.record.
* Re-synced the copied composer methods: formatDefaultBodyForFullComposer is now
  markup-based (wrapInlinesInBlocks is no longer exported), and the context splits
  cc into default_partner_cc_ids.
* Tests: asyncStep/waitForSteps -> expect.step/verifySteps.

Assisted-by: Claude Opus 5
@dnplkndll
dnplkndll force-pushed the 20.0-mig-web_send_message_popup branch from fa17bf2 to edb7c71 Compare October 2, 2026 01:40
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.