Hi all,
I am looking to apply a standard font (Roboto) to the Odoo Email Marketing Template. Looks like I'm stuck with Arial and even in developer mode with the HTML, I can't change using font-family.
Looking for urgent help! Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi all,
I am looking to apply a standard font (Roboto) to the Odoo Email Marketing Template. Looks like I'm stuck with Arial and even in developer mode with the HTML, I can't change using font-family.
Looking for urgent help! Thanks
Hey;
I did as below, hope it works for you as well.
- scaffold a new module
- you need to override the style in "mass_mailing.mass_mailing_mail_style". Therefore, put the code below in the view.xml. you can find the url links for the different style of the roboto here: https://fonts.google.com/specimen/Roboto
<odoo>
<data>
<template id="mass_mailing_mail_style_inherited" inherit_id="mass_mailing.mass_mailing_mail_style" >
<xpath expr="//style" position="replace">
<style>
.o_layout * {
box-sizing: border-box !important;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); format('truetype');
}
.o_layout :not(.fa) {
font-family: Roboto;
}
/* Remove space around the email design. */
html,
body {
margin: 0 auto !important;
padding: 0 !important;
height: 100% !important;
width: 100% !important;
}
/* Stop Outlook resizing small text. */
* {
-ms-text-size-adjust: 100%;
}
/* Stop Outlook from adding extra spacing to tables. */
table,
td {
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
/* Use a better rendering method when resizing images in Outlook IE. */
img {
-ms-interpolation-mode:bicubic;
}
/* Prevent Windows 10 Mail from underlining links. Styles for underlined links should be inline. */
a {
text-decoration: none;
}
@media screen and (max-width: 768px) {
.o_mail_table_styles {
width: 100% !important;
}
}
style>
xpath>
template>
data>
odoo>
- Add the view.xml path in your manifest file
'data': ['views/views.xml',],
All the best
Can You share a solution for R17?
This does not work anymore with Odoo v17. Is there a workaround for v17 available?
--edit--
Nevermind. Figured it out.
Hi, how did you manage to do this please?
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up