手机端
This commit is contained in:
@@ -9,6 +9,9 @@ import {escape, sprintf} from "@web/core/utils/strings";
|
||||
|
||||
import {Component, markup, onMounted, xml} from "@odoo/owl";
|
||||
|
||||
export function clickRefreshButton() {
|
||||
document.querySelector('button[name="sh_refresh"].sh_refresh')?.click();
|
||||
}
|
||||
/**
|
||||
* Client action to go back home.
|
||||
*/
|
||||
@@ -54,7 +57,11 @@ async function flushBadgeWithWorkflow(env, action) {
|
||||
// 跳转tree or kanban
|
||||
const { tree_id, kanban_id, uid } = action.params;
|
||||
if (tree_id && kanban_id && uid) {
|
||||
return env.services.action.doAction(getWkfAction(tree_id, kanban_id, uid, env.isSmall));
|
||||
env.services.action.doAction(getWkfAction(tree_id, kanban_id, uid, env.isSmall));
|
||||
setTimeout(() => {
|
||||
clickRefreshButton();
|
||||
}, 300)
|
||||
return
|
||||
}
|
||||
|
||||
const controller = env.services.action.currentController;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { patch } from "@web/core/utils/patch";
|
||||
import { deepCopy } from "@web/core/utils/objects";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { url } from "@web/core/utils/urls";
|
||||
import { clickRefreshButton } from "../actions/client_actions"
|
||||
|
||||
const WKF_NOTIFY_TYPE = 'wkf_notify'
|
||||
|
||||
@@ -27,9 +28,12 @@ patch(NavBar.prototype, {
|
||||
for (const d of detail) {
|
||||
if (d?.type === WKF_NOTIFY_TYPE) {
|
||||
this.menuService.reload();
|
||||
return this.audio.play().catch((e) => {
|
||||
console.log(e)
|
||||
});
|
||||
return this.audio.play()
|
||||
.then(() => {
|
||||
clickRefreshButton();
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +63,7 @@ patch(NavBar.prototype, {
|
||||
}
|
||||
}
|
||||
}
|
||||
clickRefreshButton();
|
||||
}, 300)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user