[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) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
Xavier BOL (xbo)
2022-11-15 19:22:13 +01:00
parent 927d6b9ae7
commit 9971d1e98d
@@ -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();
}
}
}