-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] project: change personal stage edit display
in the edit stage of the personal stage we should only display the name of the stage and the folded bool Task-3276463 Part-of: odoo#119096
- Loading branch information
Showing
2 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
addons/project/static/src/views/project_task_kanban/project_task_kanban_header.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** @odoo-module */ | ||
|
||
import { KanbanHeader } from "@web/views/kanban/kanban_header"; | ||
import { FormViewDialog } from "@web/views/view_dialogs/form_view_dialog"; | ||
|
||
export class ProjectTaskKanbanHeader extends KanbanHeader { | ||
editGroup() { | ||
const { resModel, value } = this.group; | ||
const groupBy = this.props.list.groupBy; | ||
if (groupBy.length !== 1 || groupBy[0] !== 'personal_stage_type_ids') { | ||
super.editGroup(); | ||
return; | ||
} | ||
const context = Object.assign({}, this.group.context, { | ||
form_view_ref: 'project.personal_task_type_edit', | ||
}); | ||
this.dialog.add(FormViewDialog, { | ||
context, | ||
resId: value, | ||
resModel: resModel, | ||
title: this.env._t('Edit Personal Stage'), | ||
onRecordSaved: async () => { | ||
await this.props.list.load(); | ||
this.props.list.model.notify(); | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters