mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
update demo data for actions
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
export type RPC = (route: string, params: any) => Promise<any>;
|
||||
|
||||
export const rpc: RPC = async function(route, params) {
|
||||
console.log("RPC", route, params);
|
||||
const delay = Math.random() * 1000;
|
||||
return new Promise(resolve => setTimeout(resolve, delay));
|
||||
return (<any>window).demoData.mockAjax(route, params);
|
||||
};
|
||||
|
||||
@@ -26,11 +26,28 @@ export interface ActWindowInfo extends CommonActionInfo {
|
||||
view: string;
|
||||
}
|
||||
|
||||
export interface ActionDescription {
|
||||
interface BaseActionDescription {
|
||||
id: number;
|
||||
type: "ir.actions.act_window" | "ir.actions.client";
|
||||
target: "current";
|
||||
name: string;
|
||||
}
|
||||
interface ClientActionDescription extends BaseActionDescription {
|
||||
type: "ir.actions.client";
|
||||
tag: string;
|
||||
}
|
||||
|
||||
interface ActWindowActionDescription extends BaseActionDescription {
|
||||
type: "ir.actions.act_window";
|
||||
views: [false | number, string][];
|
||||
domain: false | string;
|
||||
res_id: number;
|
||||
res_model: string;
|
||||
context: Object | string;
|
||||
}
|
||||
|
||||
export type ActionDescription =
|
||||
| ClientActionDescription
|
||||
| ActWindowActionDescription;
|
||||
|
||||
export type ActionInfo = ClientActionInfo | ActWindowInfo;
|
||||
export type ActionStack = ActionInfo[];
|
||||
|
||||
Reference in New Issue
Block a user