-
-
Notifications
You must be signed in to change notification settings - Fork 526
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][FIX] account_payment_order_vendor_email, write template with sudo #1302
base: 16.0
Are you sure you want to change the base?
Conversation
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.
easy code review, thanks
@@ -73,7 +73,7 @@ def send_vendor_email(self): | |||
) | |||
partner_email_id = payment.partner_id.email | |||
if partner_email_id: | |||
template.write({"email_to": partner_email_id}) | |||
template.sudo().write({"email_to": partner_email_id}) |
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.
Wait, why does this need to update the email on the template ?
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.
you're right @sbidoul
your ide @ChrisOForgeFlow ?
I'm not pretty sure why was design in that manner, For now I'm trying to
solve issue, but I will figure out if there is a better way to do it
…On Fri, Aug 16, 2024, 2:55 PM Florent THOMAS ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In account_payment_order_vendor_email/models/account_payment_mode.py
<#1302 (comment)>:
> @@ -73,7 +73,7 @@ def send_vendor_email(self):
)
partner_email_id = payment.partner_id.email
if partner_email_id:
- template.write({"email_to": partner_email_id})
+ template.sudo().write({"email_to": partner_email_id})
you're right @sbidoul <https://github.com/sbidoul>
your ide @ChrisOForgeFlow <https://github.com/ChrisOForgeFlow> ?
—
Reply to this email directly, view it on GitHub
<#1302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWTY2ACWXU2WNLN3362L3F3ZRZKLPAVCNFSM6AAAAABKCPPGGCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENBTGQ2TONRXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Avoid need of template modify permission, to continue process