summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2021-02-15 15:05:36 +0000
committerNicolas Lempereur <nle@odoo.com>2021-02-16 13:21:33 +0000
commit5e093b7a37984c8cc5aa73d1c0f7aa9c9345e6b1 (patch)
treeff3d9bb023bd1113bb4d019b8b8933a7494be081 /odoo
parentd056feb4ac885acc6c829c57531b985027d94daf (diff)
[FIX] base: mail signature CSS inlined for icons etc
The mail signature of an user did not inline the CSS like the body of a message, so for example icons seemed to work but would not be seen (unless the mail reader had the same font-awesome system). With this change we inline the signature too. On edition there was also an issue since the original icon was saved as data-class which was stripped: so eg. when editing a mail.message with working icon, the icons would disappear. opw-2453912 closes odoo/odoo#66264 X-original-commit: a723bcbebbbc3a526cf63f28b66f53b8be3fe76e Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'odoo')
-rw-r--r--odoo/addons/base/views/res_users_views.xml4
-rw-r--r--odoo/tools/mail.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/odoo/addons/base/views/res_users_views.xml b/odoo/addons/base/views/res_users_views.xml
index 3212d32ccfb..27d16fc770c 100644
--- a/odoo/addons/base/views/res_users_views.xml
+++ b/odoo/addons/base/views/res_users_views.xml
@@ -255,7 +255,7 @@
</group>
</group>
<group name="messaging">
- <field name="signature"/>
+ <field name="signature" options="{'style-inline': true}"/>
</group>
</page>
</notebook>
@@ -453,7 +453,7 @@
</group>
</group>
<group name="signature">
- <field name="signature" readonly="0"/>
+ <field name="signature" readonly="0" options="{'style-inline': true}"/>
</group>
<group name="status" string="Status" invisible="1">
<field name="company_id" options="{'no_create': True}" readonly="0"
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py
index 026976e112b..a97c853ebd8 100644
--- a/odoo/tools/mail.py
+++ b/odoo/tools/mail.py
@@ -38,6 +38,7 @@ safe_attrs = clean.defs.safe_attrs | frozenset(
'data-o-mail-quote', # quote detection
'data-oe-model', 'data-oe-id', 'data-oe-field', 'data-oe-type', 'data-oe-expression', 'data-oe-translation-id', 'data-oe-nodeid',
'data-publish', 'data-id', 'data-res_id', 'data-interval', 'data-member_id', 'data-scroll-background-ratio', 'data-view-id',
+ 'data-class',
])