Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,58 @@ export class TierReviewMenu extends Component {
onBeforeOpen() {
this.fetchSystrayReviewer();
}
availableViews() {
// eslint-disable-next-line no-unused-vars
availableViews(group) {
return [
[false, "kanban"],
[false, "list"],
[false, "form"],
[false, "activity"],
];
}
openReviewGroup(group) {
// eslint-disable-next-line no-unused-vars
async getCustomAction(group) {
return false;
}
async openReviewGroup(group) {
document.body.click();
// Hack to close dropdown
const context = {};
var domain = [["can_review", "=", true]];
if (group.active_field) {
domain.push(["active", "in", [true, false]]);
}
const views = this.availableViews();

this.action.doAction(
{
context,
domain,
name: group.name,
res_model: group.model,
search_view_id: [false],
type: "ir.actions.act_window",
views,
},
{
clearBreadcrumbs: true,
}
);
const action = await this.getCustomAction(group);
if (action) {
this.action.doAction(
{
...action,
context,
domain,
},
{
clearBreadcrumbs: true,
}
);
} else {
const views = this.availableViews(group);

this.action.doAction(
{
context,
domain,
name: group.name,
res_model: group.model,
search_view_id: [false],
type: "ir.actions.act_window",
views,
},
{
clearBreadcrumbs: true,
}
);
}
}
}

Expand Down