Daily updates from Odoo
Monday, October 23, 2017
1 change
Resolved issues and error corrections
Website page tracking for CRM scoring can now be controlled through the same page setting used for regular website pages. This makes tracking behavior consistent across static and dynamic pages, so teams can enable or disable tracking without requiring hardcoded developer changes.
Original PR description
Before this commit: To make a controller (@route) trackable, we should add 'track=True' on the @route. It would then correctly track the route BUT there were 2 problems: 1. It was not easily (or at…
Before this commit: To make a controller (@route) trackable, we should add 'track=True' on the @route. It would then correctly track the route BUT there were 2 problems: 1. It was not easily (or at all) configurable. It should be hardcoded in routes and therefore, the behavior/use case was not the same as website.page which use the checkbox on optimize SEO 'Track Page'. 2. Some routes returns an 'ir.ui.view' as main object, some don't (eg: /blog return blob.blog while /event return ir.ui.view). Problem was, the option to track a page was only displayed if the main object was an ir.ui.view or a website.page. So even if the checkbox was shown for some routes (thoses returning an ir.ui.view as main object), checking or unchecking it would in fact have no effect because for @routes it would only check for track=True on the route itself. Now: 1. track=True on @route is gone, we use the route's view's track state like website.page does. 2. Since every routes have a template (even if they don't return an ir.ui.view as main object), we use it to store the track state of the page. This way, the behavior/use case is the same for static or dynamic pages. This commit depends on community commit setting copy_template & viewid