diff options
| author | ryv-odoo <ryv@odoo.com> | 2019-09-23 13:57:43 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-30 06:35:07 +0000 |
| commit | 4ed2bd4abfe07951b714af2e438d9182b72d7655 (patch) | |
| tree | 99050a8b78cd6c5f3e3a7225133f92ccc1cc7ab5 /addons/survey/static/src/js/fields_section_one2many.js | |
| parent | 5074430bfb613b1f18ff6b9252f7b1ac2c39d199 (diff) | |
[FIX] survey : random question count not editable
We can't edit the random question count field from the survey form (in
list widget). Change the function which compute the colspan
of a field (during edition).
TASK_ID : 2075216
closes odoo/odoo#39549
X-original-commit: 61d61348d3e5abf852edb692bb412f177ae5e167
Signed-off-by: ryv-odoo <ryv-odoo@users.noreply.github.com>
Co-authored-by: Michaƫl Mattiello <mcm@odoo.com>
Diffstat (limited to 'addons/survey/static/src/js/fields_section_one2many.js')
| -rw-r--r-- | addons/survey/static/src/js/fields_section_one2many.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/survey/static/src/js/fields_section_one2many.js b/addons/survey/static/src/js/fields_section_one2many.js index 5a30b4f787d..72fa2e11f15 100644 --- a/addons/survey/static/src/js/fields_section_one2many.js +++ b/addons/survey/static/src/js/fields_section_one2many.js @@ -37,7 +37,7 @@ var SectionListRenderer = ListRenderer.extend({ var isSection = record.data[this.sectionFieldName]; if (isSection){ - if (node.attrs.widget === "handle"){ + if (node.attrs.widget === "handle" || node.attrs.name === "random_questions_count"){ return $cell; } else if (node.attrs.name === "title"){ var nbrColumns = this._getNumberOfCols(); @@ -47,6 +47,9 @@ var SectionListRenderer = ListRenderer.extend({ if (this.addTrashIcon){ nbrColumns--; } + if (record.data.questions_selection === "random"){ + nbrColumns--; + } $cell.attr('colspan', nbrColumns); } else { $cell.removeClass('o_invisible_modifier'); |
