summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipalee Bhalodia <dbh@odoo.com>2018-06-18 18:01:05 +0530
committerThibault Delavallée <tde@odoo.com>2018-07-24 15:33:22 +0200
commit2ab0fc6bf389e7e7536c35e6ba01a9bf12843b37 (patch)
treee78e1695d5ac8d6fc4213de77e0340376997dab3
parentb26679ce16187db03f10e96cdb5ac7175b4398b4 (diff)
[IMP] hr: make templates more modern and updated with Odoo guidelines
In this commit we improve templates used in hr. Purpose of this commit is to have templates that embed or use standard Odoo email layouts to make them look modern and have a common style across all emails. Main guidelines * better use of div / p / br to try to lessen layout issues, especially when updating templates using the editor; * correctly sequence the templates fields definition; * correctly set templates values notably auto_delete and user_signature fields to avoid confusion; * correctly layout the email content using light notification email. It can either propagate the layout choice through various send mail methods or directly embed the styling in the templates for more technical or complex templates; * use email_formatted computed field when possible to avoid having hand-made from / to addresses; * fix various typos and improve subjects when necessary; Content of emails is not necessarily updated as the purpose of this task is about styling, not content itself. This commit is linked to task ID 1843361 (and 1868112) and to PR #25299 (and #25889).
-rw-r--r--addons/hr/data/hr_data.xml34
1 files changed, 31 insertions, 3 deletions
diff --git a/addons/hr/data/hr_data.xml b/addons/hr/data/hr_data.xml
index 8ce5b78ec72..58afb0ede52 100644
--- a/addons/hr/data/hr_data.xml
+++ b/addons/hr/data/hr_data.xml
@@ -19,14 +19,42 @@
</record>
<record id="mail_template_data_unknown_employee_email_address" model="mail.template">
- <field name="name">HR: unknown employee bounce</field>
+ <field name="name">HR: mailgateway unknown employee bounce</field>
+ <field name="model_id" ref="base.model_ir_module_module"/>
<field name="subject">Your document has not been created</field>
<field name="email_from">${user.email}</field>
<field name="email_to">${ctx['email_to']|safe}</field>
+ <field name="body_html" type="html">
+<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
+<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 16px; background-color: white; color: #454748; border-collapse:separate;">
+<tbody>
+ <tr>
+ <td align="center" style="min-width: 590px;">
+ <table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
+ <tr><td valign="top" style="font-size: 13px;">
+ <div>
+ Hi,<br/>
+ Your document has not been created because your email address is not recognized. Please send emails with the email address recorded on your employee information, or contact your HR manager.
+ </div>
+ </td></tr>
+ </table>
+ </td></tr>
+</tbody>
+</table>
+</td></tr>
+<!-- POWERED BY -->
+<tr><td align="center" style="min-width: 590px;">
+ <table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: #F1F1F1; color: #454748; padding: 8px; border-collapse:separate;">
+ <tr><td style="text-align: center; font-size: 13px;">
+ Powered by <a target="_blank" href="https://www.odoo.com" style="color: #875A7B;">Odoo</a>
+ </td></tr>
+ </table>
+</td></tr>
+</table>
+ </field>
<field name="lang">${user.lang}</field>
- <field name="model_id" ref="base.model_ir_module_module"/>
<field name="auto_delete" eval="True"/>
- <field name="body_html" ><![CDATA[Your document has not been created because your email address is not recognized. Please send emails with the email address recorded on your employee information, or contact your HR manager.]]></field>
+ <field name="user_signature" eval="False"/>
</record>
</data>