diff options
| author | Victor Feyens <vfe@odoo.com> | 2019-11-06 11:14:52 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2019-11-21 15:31:30 +0000 |
| commit | 21bcafc053be7f80eed7a684fee2dc1e3caaafa5 (patch) | |
| tree | b93ff5a8615f5f995fb49f9291c6e8d9cc5f1819 | |
| parent | 53bc9dcdc638af008d7dc0b139af306f8912fb7a (diff) | |
[FIX] product_matrix: ensure the data is taken from a targeted widget.
X-original-commit: 44462e11ddba648d64fb75997e3f87a877c642eb
| -rw-r--r-- | addons/product_matrix/static/src/js/section_and_note_widget.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/product_matrix/static/src/js/section_and_note_widget.js b/addons/product_matrix/static/src/js/section_and_note_widget.js index 32d2b600064..a6edba25148 100644 --- a/addons/product_matrix/static/src/js/section_and_note_widget.js +++ b/addons/product_matrix/static/src/js/section_and_note_widget.js @@ -72,8 +72,12 @@ SectionAndNoteFieldOne2Many.include({ }, viewType: 'form', onSuccess: function (result) { - // why the hell do we receive a table of 8 classes here? :o - self._openMatrixConfigurator(result[0].recordData.grid, productTemplateId, editedCellAttributes); + // result = list of widgets + // find one of the SO widget + // (not so lines because the grid values are computed on the SO) + // and get the grid information from its recordData. + var gridInfo = result.find(r => r.recordData.grid).recordData.grid; + self._openMatrixConfigurator(gridInfo, productTemplateId, editedCellAttributes); } }); }, |
