Skip to content

Commit

Permalink
Merge PR #636 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by guewen
  • Loading branch information
OCA-git-bot committed Apr 4, 2024
2 parents d60f3bc + 68293db commit e218625
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions queue_job_batch/static/src/js/systray_service.esm.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/** @odoo-module **/

import {QueueJobBatchMenuContainer} from "./batch_menu_container_view.esm";

import {registry} from "@web/core/registry";
import session from "web.session";

const systrayRegistry = registry.category("systray");

export const systrayService = {
start() {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
session
.user_has_group("queue_job_batch.group_queue_job_batch_user")
.then(function (has_group) {
if (has_group) {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
}
});
},
};

Expand Down

0 comments on commit e218625

Please sign in to comment.