-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] project: project grouped by stages now respects the pagination
Steps to reproduce ================== - Open any project - Create many project stages (80+) - Switch to the list view - Group by stage - Switch to to next page => The pager keeps increasing Cause of the issue ================== `stage_id` has a group_expand: `_read_group_stage_ids` This method is used to include empty stages in the result for the kanban view, so that we can drag tasks to an empty stage. Solution ======== Add a context key `project_kanban` and only add empty stages in that case. opw-4408061 closes odoo#192955 X-original-commit: f4c41aa Signed-off-by: Xavier Bol (xbo) <[email protected]>
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
addons/project/static/src/project_sharing/views/kanban/kanban_view.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,16 @@ | ||
/** @odoo-module */ | ||
|
||
import { kanbanView } from "@web/views/kanban/kanban_view"; | ||
import { RelationalModel } from "@web/model/relational_model/relational_model"; | ||
|
||
export class ProjectSharingTaskKanbanModel extends RelationalModel { | ||
async _webReadGroup(config, firstGroupByName, orderBy) { | ||
config.context = { | ||
...config.context, | ||
project_kanban: true, | ||
}; | ||
return super._webReadGroup(...arguments); | ||
} | ||
} | ||
|
||
kanbanView.Model = ProjectSharingTaskKanbanModel; |
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