-
-
Notifications
You must be signed in to change notification settings - Fork 62
[16.0][IMP] sign_oca: use mail.template instead of static mails #142
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
base: 16.0
Are you sure you want to change the base?
Conversation
|
Hi @etobella, |
|
@rvalyi here is a new feature to customize the design of the email sent. |
|
@kobros-tech can we add a button to have AI make a nice professional email template now! I guess that is another module. |
yes, I will try |
7d07454 to
84fd8ca
Compare
|
here wa are ready. |
| mail_auto_delete=False, | ||
| email_layout_xmlid="mail.mail_notification_light", | ||
| template = self.env.ref("sign_oca.email_template_sign_document") | ||
| template.with_context(body=message, link=signer.access_url).send_mail( |
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.
Should it be message_post_with_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.
this method is ok if we log the same message in chatter, I can't use the mail template with sign request, but it is very easy for me and customizable to use with signer model.
you see me setting variables in the start of HTML, then I do the free full customization.
This is what we want so UX team can work straight forward.
There is a need to make a well designed email template, in order to encourage partners to sign if the see a professional email.
84fd8ca to
d1a2d68
Compare
|
would you like me to write about this new feature in readme? Do you suggest a sentence? |
|
No need |
|
@pedrobaeza |
| <field name="description">A notification to sign a document</field> | ||
| <field name="body_html" type="html"> | ||
| <t t-set="sender" t-value="object.request_id.create_uid" /> | ||
| <t t-if="sender.name in ['OdooBot', 'Public 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.
You should never use this hard code.... what happens if the user changes the name of OdooBot to MyCompanyBot?
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 should never use this hard code.... what happens if the user changes the name of OdooBot to MyCompanyBot?
Never underestimate users "creativity" ;-)




There is a need to make a well designed email template, in order to encourage partners to sign if the see a professional email.