/** @odoo-module */ import { registry } from "@web/core/registry"; import { session } from "@web/session"; import { companyService } from "@web/webclient/company_service"; import { patchWithCleanup } from "@web/../tests/helpers/utils"; import { setupViewRegistries } from "@web/../tests/views/helpers"; import { timesheetUOMService } from "@hr_timesheet/services/timesheet_uom_service"; export const getServerData = () => JSON.parse(JSON.stringify({ models: { 'account.analytic.line': { fields: { project_id: { string: "Project", type: "many2one", relation: "project.project" }, task_id: { string: "Task", type: "many2one", relation: "project.task" }, unit_amount: { string: "Unit Amount", type: "integer" }, }, records: [ { id: 1, project_id: 1, task_id: 3, unit_amount: 1 }, { id: 2, project_id: 1, task_id: false, unit_amount: 1 }, { id: 3, project_id: false, task_id: false, unit_amount: 1 }, ], }, 'project.project': { fields: { name: { string: "Name", type: "string" }, }, records: [ { id: 1, name: "Project 1" }, ], }, 'project.task': { fields: { name: { string: "Name", type: "string" }, project_id: { string: "Project", type: "many2one", relation: "project.project" }, progress: { string: "progress", type: "float" }, }, records: [ { id: 1, name: "Task 1\u00A0AdditionalInfo", project_id: 1, progress: 50 }, { id: 2, name: "Task 2\u00A0AdditionalInfo", project_id: 1, progress: 80 }, { id: 3, name: "Task 3\u00A0AdditionalInfo", project_id: 1, progress: 104 }, ], }, }, views: { "account.analytic.line,false,form": `
`, "account.analytic.line,false,list": `