Odoo's Mergebot 70f3dd8a17 [IMP] survey: allow more question type scoring
### PURPOSE

Support correct answers, scoring mechanism, and demo data on additional question types:
- Numerical Value
- Date
- Datetime

Additional improvements and fixes include:
- When checking answer type, add in check to allow 0 as a valid survey answer to a question of type Numerical Value.
-  Include "most common" tab for question type Date in results page.
- Do not show skipped answer (i.e. blank User Response value) rows in results page tables (for results of non-choice questions).

### SPECIFICATIONS

**New question types scoring:**

Previously only the question_types: 'simple_choice' and 'multiple_choice' could be scored and have a "correct" answer(s). This change makes it so that question_types: 'numerical_box', 'date', and 'datetime' can also have a "correct" answer and an associated 'answer_score'. Some restructuring of scoring logic was required in order to accommodate and better streamline new question_types scoring.

Demo and testing data also added for these new scorable question types. New demo data includes both scored and unscored (i.e. answer_score = 0) instances for the 3 question types to ensure differing behavior is viewable in survey results. During this update, errors in existing demo data were fixed when discovered. The same demo data additions/updates were duplicated in the relevant tests.

**Additional improvements/fixes:**

- Answer type check: additional conditional needed to handle 0 evaluating to False even though it is a valid entry as a numerical value.
- "most common" tab added only for Date since it is currently not expected to be useful for Datetime questions. Implementation is left generic for future additional question types scoring implementations.
- Skipped answers were shown either as a blank value for Date, Datetime, Multiple Line Text Box, Single Line Text Box or 0.0 for Numerical Value question types. A simple check to skip these skipped lines from being shown in the results page is all that is needed.
- Light rewriting of question form view to include answer-related options and choices directly in the "Answer" tab.

LINKS

Upgrade PR: odoo/upgrade#835
Task ID: 2061937

closes odoo/odoo#43014

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-19 17:00:26 +01:00
2020-02-13 11:45:39 +00:00
2020-03-17 09:48:34 +00:00
2015-09-08 15:45:09 +02:00
2019-10-03 12:48:09 +00:00
…
2015-09-08 17:58:38 +02:00
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +00:00

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%