diff options
| author | rde <rde@odoo.com> | 2017-10-18 16:48:28 +0200 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2017-10-23 14:31:07 +0200 |
| commit | e19c6a5ead59c1197bc4d2cdd04d086519b1caf9 (patch) | |
| tree | d57bb464e6f6c3b9705a04de2edaa6b0996a1b65 /odoo/http.py | |
| parent | 7ec5f093de10c965b217714fa3f78834f0386b10 (diff) | |
[IMP] website: set viewid in frontend & save template for dispatch
This commit is related to enterprise commit adding crm_track option to routes.
Before this commit:
We could not get template's name after dispatch() had been called. Indeed,
it will remove the template name from the response (response.flatten()) to
make it not considered as 'qweb' anymore (is_qweb()).
In some case (e.g. website_crm_score), we still need the template's name later.
(Eg: to retrieve the route's view being rendered and check if trackable or not)
Add view-id in template, when main_object is not an ir_ui_view, it avoid to
make extra rpc to get the view_id.
this commit closes #20313
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/http.py b/odoo/http.py index 3da0379e551..d19190870c6 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -1219,6 +1219,7 @@ class Response(werkzeug.wrappers.Response): def set_default(self, template=None, qcontext=None, uid=None): self.template = template self.qcontext = qcontext or dict() + self.qcontext['response_template'] = self.template self.uid = uid # Support for Cross-Origin Resource Sharing if request.endpoint and 'cors' in request.endpoint.routing: |
