Chrome中调试Odoo前端框架 - xiaohao0576/odoo-doc GitHub Wiki

获取app和常用对象

const appArray = Array.from(owl.App.apps);

const app = appArray[0];

const orm = app.env.services.orm;

const rpc = app.env.services.rpc;

const http = app.env.services.http;

const action = app.env.services.action;

const notify = app.env.services.notification;

action服务中的有用的方法

loadAction, doAction

在页面显示提醒消息

app.env.services.notification.add("操作成功", { type: "success", title: "提示", sticky: false });