-
- Downloads
[FIX] web: fix two issues when discarding records
This commit actually fixes a few problems: 1. the _visitChildren method in the basic model was not following the changes, only the data, so it was not correct (for example, the isDirty method was wrong for relational data, when no other change was done) 2. new records could not be discarded, because they had no data in their data key. What we do here is to add a savePoint, so it is safe to restore them (it caused a crash) 3. the save method was not properly following children when it was called with the option savePoint=true 4. when the user tried to discard a form view, in an action with only a form view, it was redirected to the previous url (via the history_back action), instead of simply discarding the current form view
Showing
- addons/web/static/src/js/chrome/view_manager.js 27 additions, 0 deletionsaddons/web/static/src/js/chrome/view_manager.js
- addons/web/static/src/js/views/basic/basic_model.js 31 additions, 7 deletionsaddons/web/static/src/js/views/basic/basic_model.js
- addons/web/static/src/js/views/form/form_controller.js 1 addition, 1 deletionaddons/web/static/src/js/views/form/form_controller.js
- addons/web/static/tests/views/basic_model_tests.js 0 additions, 1 deletionaddons/web/static/tests/views/basic_model_tests.js
- addons/web/static/tests/views/form_tests.js 132 additions, 1 deletionaddons/web/static/tests/views/form_tests.js
Loading
Please register or sign in to comment