Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] mail_gateway_whatsapp: Add support for WhatsApp templates #1497

Draft
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

carlos-lopez-tecnativa
Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa commented Nov 14, 2024

If the company wants to initiate a conversation with a customer, a template must be used; otherwise, messages will not be sent. This also applies when the last conversation with the customer is older than 24 hours.

  • Enabled downloading templates from META
  • Added the ability to create templates directly in Odoo.

Note: Currently does not support templates with variables or buttons

TT51660
@Tecnativa @pedrobaeza @chienandalu @etobella could you please review this

@matteoopenf

This comment was marked as off-topic.

If the company wants to initiate a conversation with a customer, a template must be used; otherwise, messages will not be sent.
This also applies when the last conversation with the customer is older than 24 hours.

- Enabled downloading templates from META
- Added the ability to create templates directly in Odoo.

Note: Currently, templates with variables or buttons are not supported.
@pedrobaeza

This comment was marked as off-topic.

@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 16.0-mail_gateway_whatsapp-add-templates branch from 067229c to 843eb4f Compare November 14, 2024 17:28
@carlos-lopez-tecnativa
Copy link
Contributor Author

I fixed the test issues related to the module mail_gateway_whatsapp, but I'm not sure if the other errors are related(mail_composer_cc_bcc_account). Could you please take a look? @pedrobaeza @etobella
https://github.com/OCA/social/actions/runs/11842395654/job/33000889279?pr=1497#step:8:1146

…ated to the current user

- Use OdooBot for webhooks instead of the current user, following the same logic as Odoo.
- Avoid automatically adding the current user as a member of a new gateway to prevent notifications for all messages. This is now an explicit configuration.
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

At a technical Level LGTM

help="User that will create the messages",
)
member_ids = fields.Many2many(
"res.users", default=lambda self: [Command.link(self.env.user.id)]
Copy link
Member

Choose a reason for hiding this comment

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

I think this changes are the reason behind the test issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this changes are the reason behind the test issue

The CI has been failing for several days on all PRs/commits in V16.

The last commit is unrelated to WhatsApp templates. If you prefer, I can create a new PR for it separately. However, this commit is not linked to the tests but addresses a different case, please refer to the commit description for more details.

Let me know what you think.

Copy link

@cuongnmtm cuongnmtm left a comment

Choose a reason for hiding this comment

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

LGTM (code review and functional test).

@etobella
Copy link
Member

CI is working in main branch, can you apply my suggestion and rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants