diff options
| author | David Beguin <dbe@odoo.com> | 2019-12-12 10:07:33 +0000 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2020-01-10 06:51:50 +0000 |
| commit | 8f3d82720a42e5d9201b85410584b1c9f5f3a1ac (patch) | |
| tree | 2652c2521acfb516d45d27ef4ba9f14a9877c3be /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 2d4711a3b9438eaf658f1c759c93790c37d39db7 (diff) | |
[FIX] survey: fix matrix prepare answer method
The matrix data structure awaited by the server is the following :
{
question_id: {
'row_id_1': ['col_id1', ..., 'col_idn'],
'row_id_n': ['col_id1', ..., 'col_idn'],
'comment': 'This is a comment',
}
}
Before this commit, the comment was encapsulated into a dict, into an array,
with an incorrect key :
-> 'questionId_comment': [{'comment': 'This is a comment'}]
This was leading to 2 errors :
- A traceback when nothing is selected in the matrix options
- Comment is never saved.
After this commit, the comment is correctly given to and extracted by the
server. So the comment is saved and the traceback is avoided.
Task ID: 2152223
closes odoo/odoo#43086
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
