summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorAurélien Warnon <awa@odoo.com>2020-02-26 08:12:54 +0000
committerAurélien Warnon <awa@odoo.com>2020-05-06 13:01:08 +0000
commit71e17248a4695b3de6869da21ddacc31d6e830c8 (patch)
tree83212f5e147628a500a0e8af030ceadea0282ce3 /addons/web_editor/static/src/js
parenteb08e2c22896334fc26aedb353a310421e42b89b (diff)
[REF] survey: move from onchange to editable stored fields
PURPOSE Try to move from onchange / default_get to stored editable computed fields. Behavior should be the same (computed or set by user), with support of create / write / onchange field update without additional code. SPECIFICATIONS Update classic fields updated in some cases by onchange and/or default methods by fields with store=True, readonly=False. It means their value comes either from manual user input, either from trigger based computation. Remove onchange and default_get when possible, leading to an unique computation method and clearing fields definition. Also clean some fields definition inconsistencies, notably required fields that should instead be correctly computed or default that have no real meaning. SURVEY USE CASES - On survey.question, the question_type field should be emptied if the question is a page (is_page = True) - On survey.survey, if scoring is configured, the minimum scoring success should be between 0 and 100 (added SQL constraint). - On survey.survey, the certification field cannot be True if we're in no scoring mode (scoring_type = 'no_scoring') - On survey.survey, the attempts number cannot be limited (is_attempts_limited is False) if the access mode is public and the login is not required. - On survey.survey, we cannot give a badge (certification_give_badge is False) if it's not a certification or if the login is not required. - On survey.invite, the "subject" and "body" field are based on the template used (template_id field). MISC - As "validation_email" works with "validation_required", we removed the onchange on "validation_email". - To avoid extra complexity with an onchange on "is_time_limited" and "time_limit", we simply default the time_limit field to 10. LINKS Upgrade PR odoo/upgrade#847 Task 2187377 closes odoo/odoo#46291 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
0 files changed, 0 insertions, 0 deletions