Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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: 1. 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()). We need the template in some case. Eg: In case of website_crm_score, after the dispatch() we still need the template's name to retrieve the @route's view being rendered to check if it was trackable or not. 2. To make an RPC that directly READ or WRITE to a record, we need its ID. In case of a page with a main object other than ir.ui.view, we would need to make extra RPC to get the view's id of the page based on the view's name that we got on the HTML data attributes. Now: 1. On response's INIT, we store a copy of the template's name. 2. We set the view's ID on HTML data attributes clientside.
- Loading branch information