d63674d989b770286c07835be0ce9855f06b6650
Currently, track proposals are submitted through an HTML form with an "action" attribute, which requires that the associated route returns a redirect response. However, redirecting to a different page comes with its set of issues. Indeed, when the track is submitted, the user that just submitted the track no longer has access to it (because it's not published). In 157a1d77058da97954edc9efba6ab9f43c7d13a2 We attempted to resolve this issue by checking if the partner set on the track is the same as the partner set on the website.visitor record. However, this does not handle every use cases since when specifying different contact information, we create a different res.partner, making the check fail. In this commit, we rework the track proposal submission to use AJAX instead. This allows to dynamically show a "success" message while staying on the same page, removing the need for redirects and "complex" ACLs checks. While the main goal of this change is to avoid the need for that security check, it also has a few additional minor advantages: - Slightly faster UI, as you don't have to wait for a full page reload - Fewer routes to maintain - Easier and more thorough validation handling (current code returns a ugly error page if validation fails server-side) - Code makes a bit more sense, as we don't have a template that varies from "form" to "success message" depending on the presence of a "track" variable Task-2618734 UPG PR odoo/upgrade#2722 closes odoo/odoo#74848 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%