diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2019-12-02 10:18:33 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2019-12-04 13:06:54 +0000 |
| commit | e237ba26f7fbe687ff87ed5311549671d5682515 (patch) | |
| tree | 2bb0a4c450eca5ea3bc7fbc5e1eba30d011822be /addons/web/controllers/main.py | |
| parent | 96ab29c9873ee3d0f603068c6bc0c2d4056a3081 (diff) | |
[IMP]: web, tools: static inheritance do not disclose t-inherit* directives
Before this commit, when a template was inheriting from another
the template mentionned its t-inherit
This has been deemed overkill as the information is irrelevant to the caller
i.e. the caller just wants the template and doesn't care how they've been computed
After this commit, only t-name and attributes not related with inheritance
are disclosed
[FIX]: base: static inheritance propagates other attributes
When doing a inherit in primary mode, the original attributes on the root node of
the inheriting template were not propagated
After this commit they are
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 0ae52465604..06b146c318f 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -517,8 +517,9 @@ class HomeStaticTemplateHelpers(object): inherited_template = apply_inheritance_specs(parent_tree, xpaths) if inherit_mode == self.PRIMARY_MODE: # New template_tree: A' = B(A) - inherited_template.set(self.NAME_TEMPLATE_DIRECTIVE, template_name) - inherited_template.set(self.STATIC_INHERIT_DIRECTIVE, template_tree.attrib[self.STATIC_INHERIT_DIRECTIVE]) + for attr_name, attr_val in template_tree.attrib.items(): + if attr_name not in ('t-inherit', 't-inherit-mode'): + inherited_template.set(attr_name, attr_val) if self.debug: self._remove_inheritance_comments(inherited_template) self.template_dict[addon][template_name] = inherited_template |
