Browse Source

Merge pull request #98 from dbo-odoo/10.0-mig-email_template_qweb

[MIG] email_template_qweb: Migrated to 10.0
pull/109/head
Rafael Blasco 8 years ago
committed by GitHub
parent
commit
e548a65008
  1. 7
      email_template_qweb/README.rst
  2. 4
      email_template_qweb/__manifest__.py
  3. 2
      email_template_qweb/models/mail_template.py
  4. 2
      email_template_qweb/tests/test_mail_template_qweb.py
  5. 2
      email_template_qweb/views/mail_template.xml

7
email_template_qweb/README.rst

@ -9,6 +9,7 @@ This module was written to allow you to write email templates in QWeb instead
of jinja2. The advantage here is that with QWeb, you can make use of
inheritance and the ``call`` statement, which allows you to reuse designs and
snippets in multiple templates, making your development process simpler.
Furthermore, QWeb views are easier to edit with the integrated ACE editor.
Usage
=====
@ -23,7 +24,7 @@ To use this module, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/8.0
:target: https://runbot.odoo-community.org/runbot/205/10.0
Demo data contains an example on how to separate corporate identity from a
template's content.
@ -35,10 +36,10 @@ For further information, please visit:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/server-tools/issues/new?body=module:%20email_template_qweb%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`here <https://github.com/OCA/social/issues/new?body=module:%20email_template_qweb%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======

4
email_template_qweb/__manifest__.py

@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "QWeb for email templates",
"version": "9.0.1.0.0",
"version": "10.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Marketing",
@ -18,5 +18,5 @@
"data": [
"views/mail_template.xml",
],
'installable': False,
'installable': True,
}

2
email_template_qweb/models/mail_template.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, tools, models
from odoo import api, fields, tools, models
class MailTemplate(models.Model):

2
email_template_qweb/tests/test_mail_template_qweb.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase
class TestMailTemplateQweb(TransactionCase):

2
email_template_qweb/views/mail_template.xml

@ -10,7 +10,7 @@
<field name="body_html" position="before">
<group attrs="{'invisible': [('body_type', '!=', 'qweb')]}">
<field name="body_view_id" attrs="{'required': [('body_type', '=', 'qweb')]}" />
<field name="body_view_arch" attrs="{'required': [('body_type', '=', 'qweb')], 'invisible': [('body_view_id', '=', False)]}" />
<field name="body_view_arch" widget="ace" attrs="{'required': [('body_type', '=', 'qweb')], 'invisible': [('body_view_id', '=', False)]}" />
</group>
</field>
<field name="body_html" position="attributes">

Loading…
Cancel
Save