From b6a528fbf092ef62746772f6d8324917ad38b4f4 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Sun, 15 Mar 2015 12:17:08 +0100 Subject: [PATCH] [IMP] website: improve list of template for html editor when we edit a report Since commit 0167acb, the template used in translate_doc are added to the list of template when we are editing a report with the html editor. It's nice, but we don't have all the dependicies from this one. Now we recompute the list of template, to have all the related templates: the external_layer* and all templates which overload this report. --- addons/website_report/controllers/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/website_report/controllers/main.py b/addons/website_report/controllers/main.py index 11b4257b6c6..33f10076db2 100644 --- a/addons/website_report/controllers/main.py +++ b/addons/website_report/controllers/main.py @@ -28,6 +28,7 @@ class Website(Website): @route() def customize_template_get(self, xml_id, full=False): res = super(Website, self).customize_template_get(xml_id, full=full) - if full and request.session.get('report_view_ids'): - res += request.session['report_view_ids'] + if full: + for r in request.session.get('report_view_ids', []): + res += super(Website, self).customize_template_get(r.get('xml_id'), full=full) return res