diff options
| author | Mohammed Shekha <msh@odoo.com> | 2020-06-24 07:11:07 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2020-06-25 15:46:46 +0000 |
| commit | 01a8260622206262c1f2c429ba6b43d2c75b0060 (patch) | |
| tree | 729d55fbc39e455431c9701ee77f4fb87841800c /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | 19033e804ec243c593c9549a3f0024fbf2230ab1 (diff) | |
[FIX] web: drag and drop onchange fail should reload kanban
Currently, when kanban card drag and drop, it call onchange method
when onchange fails due to python error raised, e.g. UserError, kanban
view is not reloaded and kanban card stays in dropped column while
kanban card should come back to column from where it is dragged i.e.
kanban view should reload if onchange fails.
After this commit, if onchange trigerred from kanban drag and drop fails
then kanban view will get reloaded and card will come back to column
from where it is dragged.
note: in not stable version, forceFail option will not be added and
promise will fail in all cases but it is not done in stable for safety.
task-2267444
closes odoo/odoo#53695
X-original-commit: 27257d34c8b7374bfd8037de71f175f4ecb2913e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 5b58dc4d7e7..d8bab11884b 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -1582,7 +1582,7 @@ var BasicModel = AbstractModel.extend({ self._visitChildren(record, function (elem) { _.extend(elem, initialData[elem.id]); }); - resolve({}); + reject(); }); } else { resolve(_.keys(changes)); |
