diff options
| author | Adrien Widart <awt@odoo.com> | 2021-04-26 12:24:03 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2021-05-04 06:41:34 +0000 |
| commit | 62cd2c0be63738f0bbefd62de5d025990e63824f (patch) | |
| tree | 2759ca3d2b32bbfabeed1e5614d7fafbf55cbf98 /doc/_extensions/autojsdoc/parser/tests/test_params.py | |
| parent | c69fb8ec6828676a1900c56f1e87df809b6b70c2 (diff) | |
[FIX] survey: allow to modify a completed survey
Updating a completed survey will raise an error with a traceback.
To reproduce the error:
(Use demo data)
1. Survey > Participations
2. Select a completed form
3. Change one answer, Save
Error: A traceback appears "[...] ValueError: Computing score requires a
question in arguments."
Here is an extract from the method concerned:
```python
@api.model
def _get_answer_score_values(self, vals, compute_speed_score=True):
"""
[...]
"""
user_input_id = vals.get('user_input_id')
answer_type = vals.get('answer_type')
question_id = vals.get('question_id')
if not question_id:
raise ValueError(_('Computing score requires a question in
arguments.'))
```
This method needs some information to work properly.
OPW-2488974
closes odoo/odoo#69842
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Diffstat (limited to 'doc/_extensions/autojsdoc/parser/tests/test_params.py')
0 files changed, 0 insertions, 0 deletions
