diff options
| author | Barad Mahendra <mba@openerp.com> | 2018-12-05 06:22:23 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-05-09 14:58:21 +0000 |
| commit | b12ab8008b07198038e49255e2e8f165a9cfa28c (patch) | |
| tree | 98cc30c41b1febc1b2a686afb66d25428a61dc77 | |
| parent | d0be25d277538bca13f64ea3b953238f8d87856b (diff) | |
[IMP] mail: improve "Pay Now" email notification layout
In mail custom layout template display 'best regards' and signature in email
only when user exists and is not odoobot.
Border-bottom style is also now white-listed in sanitizer in order to ease
customization of emails.
Related to task ID 1873634
Linked to PR #28781
| -rw-r--r-- | addons/mail/data/mail_data.xml | 16 | ||||
| -rw-r--r-- | odoo/tools/mail.py | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 105cd650ac1..ee008eb5e31 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -262,13 +262,15 @@ <t t-esc="access_name"/> </a> </div> - <div style="margin: 0px; padding: 0px; font-size:13px;"> - Best regards, - </div> - <div>&nbsp;</div> - <div t-if="record.user_id and record.user_id.sudo().signature" style="font-size: 13px;"> - <div t-raw="record.user_id.sudo().signature"/> - </div> + <t t-if="record.user_id and not record.env.user._is_superuser()"> + <div style="margin: 0px; padding: 0px; font-size:13px;"> + Best regards, + </div> + <div>&nbsp;</div> + <div t-if="record.user_id.sudo().signature" style="font-size: 13px;"> + <div t-raw="record.user_id.sudo().signature"/> + </div> + </t> </td> </tr> <!-- FOOTER --> diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index b6a743d874c..d6b8ec256b7 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -50,7 +50,7 @@ class _Cleaner(clean.Cleaner): 'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right', 'white-space', # box model - 'border', 'border-color', 'border-radius', 'border-style', 'border-width', 'border-top', + 'border', 'border-color', 'border-radius', 'border-style', 'border-width', 'border-top', 'border-bottom', 'height', 'width', 'max-width', 'min-width', 'min-height', # tables 'border-collapse', 'border-spacing', 'caption-side', 'empty-cells', 'table-layout'] |
