Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF] survey : make survey form a widget
Purpose of this commit is - to make the survey js controller a widget, to be more 'odoo-standard'. - to lessen number of RPCs and clean old code for prefilling and validation of surveys. Clean Prefill : Prefill can be done directly in the template as the template has already all the needed values (in answer object). Clean Validation : Validation is done at server side and is independant from prefilling values. Dates: Dates are now formatted directly in the template, at rendering, using a format_date fonction pointer called in the template. Don't use widget in review mode: Remove o_survey_form class from review template as only dates were processed in the widget for review template. Breadcrumb : Remove button previous, prev=prev and go_back mechanism : The previous page is handled by the breadcrump Remove redirect url mechanism. Breadcrumb now saves the answers when going to a previous page. Move o_survey_form class to a higher div to englobe breadcrumb in the widget and ease his handling. Remove locale load as already done in session.js#load_modules This commit modifies the route type of survey submit to work in json. The js survey form controller calls now manually the route via rpc. Task ID : 1930132 PR #32419
- Loading branch information
Showing
8 changed files
with
569 additions
and
516 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.