Eliminate Python dependency: embed frontend assets in odoo-go

- Copy all OWL frontend assets (JS/CSS/XML/fonts/images) into frontend/
  directory (2925 files, 43MB) — no more runtime reads from Python Odoo
- Replace OdooAddonsPath config with FrontendDir pointing to local frontend/
- Rewire bundle.go, static.go, templates.go, webclient.go to read from
  frontend/ instead of external Python Odoo addons directory
- Auto-detect frontend/ and build/ dirs relative to binary in main.go
- Delete obsolete Python helper scripts (tools/*.py)

The Go server is now fully self-contained: single binary + frontend/ folder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc
2026-03-31 23:09:12 +02:00
parent 0ed29fe2fd
commit 8741282322
2933 changed files with 280644 additions and 264 deletions

View File

@@ -0,0 +1,27 @@
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add("check_public_employee_link_redirect", {
// starts at /odoo/employee/<employee_id>
steps: () => {
/* ignoring inactive modals since the modal may appear multiple times
thus hiding the inactive ones and playwright doesn't like doing
actions on hidden elements */
const msgSelector = '.o_dialog:not(.o_inactive_modal) .modal-content .modal-body div[role="alert"] p';
const msg = `You are not allowed to access "Employee" (hr.employee) records.
We can redirect you to the public employee list.`;
return [
{
trigger: msgSelector,
content: "See if redirect warning popup appears for current user",
timeout: 3000,
run: () => {
const errorTxt = document.querySelector(msgSelector).innerText;
if (errorTxt !== msg) {
throw new Error("Could not find correct warning message when visiting private employee without required permissions")
}
}
},
]
},
});

View File

@@ -0,0 +1,37 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add("hr_employee_tour", {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
content: "Open Employees app",
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
run: "click",
},
{
content: "Open an Employee Profile",
trigger: ".o_kanban_record:contains('Johnny H.')",
run: "click",
},
{
content: "Open a chat with the employee",
trigger: ".o_employee_chat_btn",
run: "click",
},
{
trigger: ".o-mail-ChatWindow .o-mail-ChatWindow-header:contains('Johnny H.')",
},
{
content: "Open user account menu",
trigger: ".o_user_menu .dropdown-toggle",
run: "click",
},
{
content: "Open My Preferences",
trigger: "[data-menu=preferences]",
run: "click",
},
],
});

View File

@@ -0,0 +1,78 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add("hr_employee_multiple_bank_accounts_tour", {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
content: "Open Employees app",
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
run: "click",
},
{
content: "Open an Employee Profile",
trigger: ".o_kanban_record:contains('Johnny H.')",
run: "click",
},
{
content: "Open personal tab",
trigger: ".nav-link:contains('Personal')",
run: "click",
},
{
content: "add bank 1",
trigger: "input#bank_account_ids_2",
run: "edit 1",
},
{
content: "add bank 1",
trigger: ".dropdown-item:contains('Create and edit')",
run: "click",
},
{
content: "save bank 1",
trigger: ".o_form_button_save:contains('Save')",
run: "click",
},
{
content: "add bank 2",
trigger: "input#bank_account_ids_2",
run: "edit 2",
},
{
content: "add bank 2",
trigger: ".dropdown-item:contains('Create and edit')",
run: "click",
},
{
content: "save",
trigger: ".o_form_button_save:contains('Save')",
run: "click",
},
{
content: "add bank 3",
trigger: "input#bank_account_ids_1",
run: "edit 3",
},
{
content: "add bank 3",
trigger: ".dropdown-item:contains('Create and edit')",
run: "click",
},
{
content: "save bank 3",
trigger: ".o_form_button_save:contains('Save')",
run: "click",
},
{
content: "save employee form",
trigger: ".fa-cloud-upload",
run: "click",
},
{
content: "wait for save completion",
trigger: ".o_form_readonly, .o_form_saved",
},
],
});

View File

@@ -0,0 +1,58 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add("version_timeline_auto_save_tour", {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
content: "Open Employees app",
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
run: "click",
},
{
content: "Open an Employee Profile",
trigger: ".o_kanban_record:contains('Bob M.')",
run: "click",
},
{
content: "Open Payroll Page",
trigger: ".o_notebook_headers a[name='payroll_information']",
run: "click",
},
{
content: "Open contract end date",
trigger: ".o_field_widget[name='contract_date_end'] .o_input",
run: "click",
},
{
content: "Go to the next month",
trigger: ".o_next",
run: "click",
},
{
content: "Choose date X + 1",
trigger: ".o_date_item_cell:nth-child(11) > div",
run: "click",
},
{
content: "Open Create New Version",
trigger: ".o_field_widget[name='version_id'] > .o_arrow_button_wrapper > button",
run: "click",
},
{
content: "Go to the next month",
trigger: ".o_next",
run: "click",
},
{
content: "Choose date X + 2",
trigger: ".o_date_item_cell:nth-child(12) > div",
run: "click",
},
{
content: "Wait until the form is saved",
trigger: "body .o_form_saved",
},
],
});