Skip to content

Conversation

@kobros-tech
Copy link
Contributor

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

@OCA-git-bot
Copy link
Contributor

Hi @etobella,
some modules you are maintaining are being modified, check this out!

@kobros-tech
Copy link
Contributor Author

@rvalyi
@etobella
@pedrobaeza
@wlin-kencove
@dnplkndll

here is a new feature to customize the design of the email sent.

@kobros-tech
Copy link
Contributor Author

Screenshot from 2025-11-16 00-46-13 Screenshot from 2025-11-16 00-46-05 Screenshot from 2025-11-16 00-45-57 Screenshot from 2025-11-16 00-45-47

@dnplkndll
Copy link

@kobros-tech can we add a button to have AI make a nice professional email template now! I guess that is another module.

@kobros-tech
Copy link
Contributor Author

@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

@pedrobaeza pedrobaeza changed the title [IMP] sign_oca: use mail.template instead of static mails. [16.0][IMP] sign_oca: use mail.template instead of static mails Nov 17, 2025
@pedrobaeza pedrobaeza added this to the 16.0 milestone Nov 17, 2025
@kobros-tech
Copy link
Contributor Author

@pedrobaeza

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(
Copy link
Member

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?

Copy link
Contributor Author

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.
@kobros-tech
Copy link
Contributor Author

@pedrobaeza

would you like me to write about this new feature in readme?

Do you suggest a sentence?

@pedrobaeza
Copy link
Member

No need

@kobros-tech
Copy link
Contributor Author

@pedrobaeza
hey

<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']">
Copy link
Member

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?

Copy link
Member

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" ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants