From 9971d1e98de1853447b6f6f4aba509fd656207eb Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Fri, 21 Oct 2022 11:17:33 +0000 Subject: [PATCH] [FIX] project: correctly delete the personal stage group in kanban view Before this commit, when the user removes a personal stage in Project app and this personal stage has some tasks, the kanban model will reload the data instead of delete the group. However, since the `default_group_by` is personal stages then the group deleted stays visible in the UI even if it is deleted for the backend side. This commit flags the group deleted to avoid readd the empty group when the reload is done to correctly remove the group in the UI. task-2968326 closes odoo/odoo#105801 X-original-commit: ad5a569b6ee50cc2c643975b52f23b9df385b753 Related: odoo/enterprise#33967 Signed-off-by: Laurent Stukkens (ltu) Signed-off-by: Xavier Bol (xbo) --- .../src/views/project_task_kanban/project_task_kanban_model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project/static/src/views/project_task_kanban/project_task_kanban_model.js b/addons/project/static/src/views/project_task_kanban/project_task_kanban_model.js index 5c224555389..e2302b885bd 100644 --- a/addons/project/static/src/views/project_task_kanban/project_task_kanban_model.js +++ b/addons/project/static/src/views/project_task_kanban/project_task_kanban_model.js @@ -12,9 +12,10 @@ export class ProjectTaskKanbanGroup extends KanbanModel.Group { async delete() { if (this.isPersonalStageGroup) { + this.deleted = true; return await this.model.orm.call(this.resModel, 'remove_personal_stage', [this.resId]); } else { - return super.delete(); + return await super.delete(); } } }