19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:02 +01:00
parent 62d197ac8b
commit 184bb0e321
667 changed files with 691406 additions and 239886 deletions

View file

@ -1,56 +1,82 @@
/** @odoo-module */
import { getBasicData } from "@spreadsheet/../tests/utils/data";
import { getBasicData } from "@spreadsheet/../tests/helpers/data";
import { serverState } from "@web/../tests/web_test_helpers";
export function getMenuServerData() {
const serverData = {};
serverData.menus = {
root: { id: "root", children: [1, 2], name: "root", appID: "root" },
1: {
id: 1,
children: [],
name: "menu with xmlid",
name: "App_1",
appID: 1,
xmlid: "test_menu",
actionID: "action1",
xmlid: "app_1",
children: [
{
id: 11,
name: "menu with xmlid",
appID: 1,
xmlid: "test_menu",
actionID: "spreadsheet.action1",
},
{
id: 12,
name: "menu without xmlid",
actionID: "spreadsheet.action1",
appID: 1,
},
],
},
2: { id: 2, children: [], name: "menu without xmlid", appID: 2 },
};
serverData.actions = {
action1: {
id: 99,
xml_id: "action1",
xml_id: "spreadsheet.action1",
name: "action1",
res_model: "ir.ui.menu",
type: "ir.actions.act_window",
views: [[false, "list"]],
views: [
[false, "list"],
[false, "form"],
],
},
action2: {
id: 199,
xml_id: "spreadsheet.action2",
name: "action1",
res_model: "ir.ui.menu",
type: "ir.actions.act_window",
views: [
[false, "graph"],
[false, "pivot"],
],
},
};
serverData.views = {};
serverData.views["ir.ui.menu,false,list"] = `<tree></tree>`;
serverData.views["ir.ui.menu,false,search"] = `<search></search>`;
serverData.models = {
...getBasicData(),
"ir.ui.menu": {
fields: {
name: { string: "Name", type: "char" },
action: { string: "Action", type: "char" },
groups_id: { string: "Groups", type: "many2many", relation: "res.group" },
group_ids: { string: "Groups", type: "many2many", relation: "res.group" },
},
records: [
{ id: 1, name: "menu with xmlid", action: "action1", groups_id: [10] },
{ id: 2, name: "menu without xmlid", action: "action2", groups_id: [10] },
{ id: 11, name: "menu with xmlid", action: "action1", group_ids: [10] },
{ id: 12, name: "menu without xmlid", action: "action1", group_ids: [10] },
],
},
"res.users": {
fields: {
name: { string: "Name", type: "char" },
groups_id: { string: "Groups", type: "many2many", relation: "res.group" },
group_ids: { string: "Groups", type: "many2many", relation: "res.group" },
},
records: [
{ id: 1, name: "Raoul", groups_id: [10] },
{ id: 2, name: "Joseph", groups_id: [] },
{
id: 1,
name: "Raoul",
active: true,
partner_id: serverState.partnerId,
group_ids: [10],
},
{ id: 2, name: "Joseph", group_ids: [] },
],
},
"res.group": {
@ -58,5 +84,6 @@ export function getMenuServerData() {
records: [{ id: 10, name: "test group" }],
},
};
serverState.userId = 1;
return serverData;
}