[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#66372

X-original-commit: 5e093b7a37984c8cc5aa73d1c0f7aa9c9345e6b1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2021-02-17 14:13:29 +00:00
parent 5bd031f3d3
commit 115965fdc5
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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"
+1
View File
@@ -39,6 +39,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',
])