-
- Downloads
[FIX] web: Kanban quick create: prevent multiple creation
Before this rev., if the user clicked several times on 'Add' (or pressed several times 'Enter'), on a KanbanQuickCreate record, multiple records were created. This rev. makes sure that this doesn't happen anymore by locking the widget when it is creating a record ('create' RPC that might be preceeded by an 'onchange' RPC). Several test cases are added, to mock the different scenarios that could occur, as they are all slightly different (depending on if there is an onchange or not and if the user clicks on Add or press Enter). There is still a scenario that needs to be handled, which is the one with an onchange and where the user clicks on 'Add'. This one is more tricky and will be handled by a future commit. Task 1878254.
Showing
- addons/web/static/src/js/views/kanban/kanban_controller.js 13 additions, 10 deletionsaddons/web/static/src/js/views/kanban/kanban_controller.js
- addons/web/static/src/js/views/kanban/kanban_record_quick_create.js 45 additions, 3 deletions.../static/src/js/views/kanban/kanban_record_quick_create.js
- addons/web/static/src/js/views/kanban/quick_create_form_view.js 1 addition, 1 deletion.../web/static/src/js/views/kanban/quick_create_form_view.js
- addons/web/static/src/scss/kanban_view.scss 5 additions, 0 deletionsaddons/web/static/src/scss/kanban_view.scss
- addons/web/static/tests/views/kanban_tests.js 293 additions, 31 deletionsaddons/web/static/tests/views/kanban_tests.js
Loading
Please register or sign in to comment