diff --git a/mail_layout_preview/__manifest__.py b/mail_layout_preview/__manifest__.py index 37875aed1..b947aa89b 100644 --- a/mail_layout_preview/__manifest__.py +++ b/mail_layout_preview/__manifest__.py @@ -5,7 +5,7 @@ "name": "Mail Preview", "summary": """ Preview email templates in the browser""", - "version": "14.0.1.0.1", + "version": "15.0.0.1.0", "license": "AGPL-3", "author": "Camptocamp SA,Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", diff --git a/mail_layout_preview/tests/test_layout_preview.py b/mail_layout_preview/tests/test_layout_preview.py index 986598bf6..2df26c95f 100644 --- a/mail_layout_preview/tests/test_layout_preview.py +++ b/mail_layout_preview/tests/test_layout_preview.py @@ -5,7 +5,7 @@ from lxml import etree from odoo import tools -from odoo.tests.common import HttpCase, SavepointCase, tagged +from odoo.tests.common import HttpCase, TransactionCase, tagged class TestLayoutMixin(object): @@ -14,7 +14,7 @@ class TestLayoutMixin(object): vals = { "name": "Test Preview Template", "subject": "Preview ${object.name}", - "body_html": "<p>Hello ${object.name}</p>", + "body_html": '<p>Hello <t t-out="object.name"/></p>', "model_id": env["ir.model"]._get(model).id, } vals.update(kw) @@ -22,7 +22,7 @@ class TestLayoutMixin(object): @tagged("-at_install", "post_install") -class TestLayoutPreview(SavepointCase, TestLayoutMixin): +class TestLayoutPreview(TransactionCase, TestLayoutMixin): @classmethod def setUpClass(cls): super().setUpClass() @@ -75,4 +75,4 @@ class TestController(HttpCase, TestLayoutMixin): self.base_url + "{}/{}/{}/".format(model, tmpl.id, partner.id) ) content = response.content.decode() - self.assertIn("<p>Hello {}</p>".format(partner.name), content) + self.assertIn("<p>Hello %s</p>" % (partner.name), content)