summaryrefslogtreecommitdiff
path: root/addons/project/data/project_mail_template_data.xml
diff options
context:
space:
mode:
authorOdoo's Mergebot <xmo+roboto@odoo.com>2019-11-19 17:57:58 +0100
committerGitHub <noreply@github.com>2019-11-19 17:57:58 +0100
commitb3b4a793f82288b1263d5f2ce086a7cb68abfdee (patch)
tree00a9a101609731a04a60b8845842336f9f283073 /addons/project/data/project_mail_template_data.xml
parent4f59004a0f407e93cfed2126198208738ed47f9a (diff)
parent6e79112e1d795a2a4ab2b0c4293693bb4b439486 (diff)
[REF] survey : use js widget and simplify validation and submit flow
PURPOSE Purpose of this PR is to standardize and update JS code of the survey application. It impacts mainly save, pagination and validation flows when taking surveys. Python code will have to be adapted consequently. SPECIFICATIONS: UDPATE WIDGETS Update JS code remove global selectors / global JS and use standard widgets. Lessen number of RPCs and clean old code for prefilling and validation of surveys. Contains update of notably * Survey Form: make it a real widget calling routes in RPC and doing some validation; * Prefill is now handled in the template instead of in js controller; * Submit is now done in json rpc; * Survey Timer: make timer a real widget; * Survey Result Analysis: make result, graph and pagifation real widgets; * Charts handling have been externalised in a sub widget; * Pagination have been externalised in a sub widget; 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 independent 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. Modify the route type of survey submit to work in json. The js survey form controller calls now manually the route via rpc. SPECIFICATIONS: UDPATE CONTROLLERS Refactor questions naming, validation and save flow. Simplify the answer_tag and question name by removing the survey_id (uses now only question id) for the most simple cases. Factorise the save and validate survey answers to avoid duplicate code. Review posted submit data : * process all questions by question type (instead of using form data (key,value) that needed key parsing and was un-typed) * regroup answers by questions and adapt all validation and save flow * remove post data in save and validate question methods and uses directly the answer(s) * remove useless input names Validation and submit functions have been rewritten to avoid duplicated code as many question types have quite the same validation and save process. SPECIFICATIONS: MISC Partial Forward Port : Web assets have been split into another template to avoid multiple load of those assets when website is installed. Also reset is_time_limited on scoring type change. Also remove locale load as already done in session.js#load_modules See sub commits for more details. Task ID 1930132 Closes PR #32419 closes odoo/odoo#39501 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/project/data/project_mail_template_data.xml')
0 files changed, 0 insertions, 0 deletions