- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 638
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
[16.0][IMP] mail_gateway_whatsapp: Add support for WhatsApp templates #1497
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
067229c
to
843eb4f
Compare
I fixed the test issues related to the module |
There was a problem hiding this 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
There was a problem hiding this 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).
CI is working in main branch, can you apply my suggestion and rebase? |
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.
f3b76db
to
a1b09e6
Compare
…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.
a1b09e6
to
455fa12
Compare
I have updated the code and fixed the test. Could you please review it again? |
@@ -25,12 +25,10 @@ class MailGateway(models.Model): | |||
) | |||
webhook_user_id = fields.Many2one( | |||
"res.users", | |||
default=lambda self: self.env.user.id, | |||
default=lambda self: self.env.ref("base.user_root"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why do you change this. What is the problem of the current default of these fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the settings are configured by a regular user who does not wish to receive system notifications for every message, it is better not to add them automatically. Additionally, for the webhook user, Odoo follows a similar logic by using the Odoo bot user instead of the current user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etobella can you please check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedrobaeza I reviewed and it looked good for me, I just made a small suggestion, but we can continue with merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge minor
On my way to merge this fine PR! |
Congratulations, your PR was merged at 8898100. Thanks a lot for contributing to OCA. ❤️ |
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.
Note: Currently does not support templates with variables or buttons
TT51660
@Tecnativa @pedrobaeza @chienandalu @etobella could you please review this