Skip to content

[18.0][IMP] mail_gateway_whatsapp: Add support for messages in server actions - #1796

Merged
OCA-git-bot merged 2 commits into
OCA:18.0from
Tecnativa:18.0-imp-mail_gateway-ir_actions_server
Mar 2, 2026
Merged

[18.0][IMP] mail_gateway_whatsapp: Add support for messages in server actions#1796
OCA-git-bot merged 2 commits into
OCA:18.0from
Tecnativa:18.0-imp-mail_gateway-ir_actions_server

Conversation

@pedrobaeza

@pedrobaeza pedrobaeza commented Jan 16, 2026

Copy link
Copy Markdown
Member

Depends on:

You may want to send messages through the WhatsApp gateway in your server actions the same you are able to send mails in the linked documents.

This also allows to select this kind of server action on automation rules (base_automation).

@Tecnativa TT57123

@pedrobaeza pedrobaeza added this to the 18.0 milestone Jan 16, 2026
@pedrobaeza
pedrobaeza force-pushed the 18.0-imp-mail_gateway-ir_actions_server branch 3 times, most recently from 7a4b380 to c29e678 Compare January 17, 2026 09:21
@carlos-lopez-tecnativa
carlos-lopez-tecnativa force-pushed the 18.0-imp-mail_gateway-ir_actions_server branch from c29e678 to 356d50f Compare January 19, 2026 16:15
@david-banon-tecnativa
david-banon-tecnativa force-pushed the 18.0-imp-mail_gateway-ir_actions_server branch from 356d50f to f2d97c7 Compare February 3, 2026 07:29
@pedrobaeza
pedrobaeza force-pushed the 18.0-imp-mail_gateway-ir_actions_server branch 2 times, most recently from 32abaf4 to 7d2d4fe Compare February 26, 2026 20:30

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I got an error when using the server action.
Image

I fixed this error in https://github.com/OCA/social/compare/c29e67864d94aae3e0107e7edb6c540b8d62cffe..356d50f14e48c657fe7614b008f214ef2f2e108e but I see that you reverted my change in https://github.com/OCA/social/compare/f2d97c7b9c41f53225e1b49180715d8be66745c5..32abaf45a6bbdb55080786cc43b8e4b06dde3848 Why?

Note that the function render_body_message expects the default_res_id or default_res_ids keys in the context; otherwise, the record is not set correctly.

rec_id = self.env.context.get("default_res_id")
if rec_id is None:
rec_ids = self.env.context.get("default_res_ids")
if isinstance(rec_ids, list) and rec_ids:
rec_id = rec_ids[0]
else:
rec_id = None

You may want to send messages through the WhatsApp gateway in your
server actions the same you are able to send mails in the linked
documents.

This also allows to select this kind of server action on automation
rules (base_automation).

TT57123
You may have several contacts with the same mobile number.
@pedrobaeza
pedrobaeza force-pushed the 18.0-imp-mail_gateway-ir_actions_server branch from e6a9c52 to 70da8f3 Compare February 28, 2026 11:29
@pedrobaeza

Copy link
Copy Markdown
Member Author

@carlos-lopez-tecnativa sorry the overwritten was a mistake on my side. The context has been restored.

@pedrobaeza

Copy link
Copy Markdown
Member Author

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1796-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at d436ebd. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot
OCA-git-bot merged commit bd9d9ea into OCA:18.0 Mar 2, 2026
5 of 7 checks passed
@carlos-lopez-tecnativa
carlos-lopez-tecnativa deleted the 18.0-imp-mail_gateway-ir_actions_server branch March 2, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants