[FIX] ir.qweb: use options instead of context to load asset content

The _get_asset_content is cached in function of the template option, don't use context to load content because we must load the asset in function of the compiled caller template.
This commit is contained in:
Christophe Matthieu
2016-07-05 11:31:03 +02:00
parent f1e3ac88f8
commit 4c76e9a9df
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -157,8 +157,7 @@ class IrQWeb(models.AbstractModel, QWeb):
@tools.ormcache('xmlid', 'options.get("lang", "en_US")')
def _get_asset_content(self, xmlid, options):
options = dict(self.env.context)
options.update(options,
options = dict(options,
inherit_branding=False, inherit_branding_auto=False,
edit_translations=False, translatable=False,
rendering_bundle=True)
@@ -20,7 +20,7 @@ class TestJavascriptAssetsBundle(TransactionCase):
def _get_asset(self, xmlid, env=None):
env = (env or self.env)
files, remains = env['ir.qweb']._get_asset_content(xmlid, {})
files, remains = env['ir.qweb']._get_asset_content(xmlid, env.context)
return AssetsBundle(xmlid, files, remains, env=env)
def _any_ira_for_bundle(self, type):