summaryrefslogtreecommitdiff
path: root/odoo/addons/base/tests/test_qweb.py
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-12-28 22:00:29 +0100
committerSimon Lejeune <sle@openerp.com>2017-01-02 16:12:22 +0100
commit13af401bc2c4286cabc87b4c409d478350e5d6d3 (patch)
treea405fff86f6529505e19d34a8a33c8f247ef896a /odoo/addons/base/tests/test_qweb.py
parent0d3af7ce1cf843cf00fbd719f2007cd0c6615404 (diff)
[FIX] QWeb: xml namespaces and t-call
Before this commit, when a t-call attribute triggered the compilation of a template, the compilation of this template was not aware of the nsmap of the parent, resulting in redundant xml namespaces declaration. With this commit, we pass the current nsmap through the `options` dict.
Diffstat (limited to 'odoo/addons/base/tests/test_qweb.py')
-rw-r--r--odoo/addons/base/tests/test_qweb.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/odoo/addons/base/tests/test_qweb.py b/odoo/addons/base/tests/test_qweb.py
index 284cc104840..67cb98ffcb7 100644
--- a/odoo/addons/base/tests/test_qweb.py
+++ b/odoo/addons/base/tests/test_qweb.py
@@ -373,6 +373,9 @@ class TestQWebNS(TransactionCase):
self.assertEquals(len(cac_lines), 2)
self.assertEquals(result.count('Appel'), 2)
+ # check that the t-call dit not output again the xmlns declaration
+ self.assertEquals(result.count('xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"'), 1)
+
def test_render_static_xml_with_extension(self):
""" Test the extension of a view by an xpath expression on a ns prefixed element.
"""