Browse Source

[11.0][MIG] mail_inline_css

pull/389/head
Timon Tschanz 6 years ago
committed by Holger Brunn
parent
commit
334b18e4fc
  1. 2
      mail_inline_css/README.rst
  2. 5
      mail_inline_css/__manifest__.py
  3. 20
      mail_inline_css/i18n/mail_inline_css.pot
  4. 5
      mail_inline_css/models/mail.py
  5. 2
      requirements.txt

2
mail_inline_css/README.rst

@ -52,7 +52,7 @@ Just use any mail template as Odoo standard feature
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/205/10
:target: https://runbot.odoo-community.org/runbot/205/11
Note: Note:

5
mail_inline_css/__manifest__.py

@ -1,11 +1,10 @@
# coding: utf-8
# © 2017 David BEAL @ Akretion
# Copyright 2017 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
'name': 'Mail Inline CSS', 'name': 'Mail Inline CSS',
"summary": "Convert style tags in inline style in your mails", "summary": "Convert style tags in inline style in your mails",
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'author': 'Akretion, Odoo Community Association (OCA)', 'author': 'Akretion, Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/social', 'website': 'https://github.com/OCA/social',
'license': 'AGPL-3', 'license': 'AGPL-3',

20
mail_inline_css/i18n/mail_inline_css.pot

@ -1,20 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_inline_css
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mail_inline_css
#: model:ir.model,name:mail_inline_css.model_mail_template
msgid "Email Templates"
msgstr ""

5
mail_inline_css/models/mail.py

@ -1,5 +1,4 @@
# coding: utf-8
# © 2017 David BEAL @ Akretion
# Copyright 2017 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging import logging
@ -17,7 +16,7 @@ class MailTemplate(models.Model):
_inherit = 'mail.template' _inherit = 'mail.template'
def generate_email(self, res_ids, fields=None): def generate_email(self, res_ids, fields=None):
res = super(MailTemplate, self).generate_email(res_ids, fields=fields)
res = super().generate_email(res_ids, fields=fields)
if 'body_html' in res: if 'body_html' in res:
res['body_html'] = transform(res['body_html']) res['body_html'] = transform(res['body_html'])
return res return res

2
requirements.txt

@ -0,0 +1,2 @@
premailer
Loading…
Cancel
Save