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,38 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add('create_crm_team_tour', {
url: "/odoo",
steps: () => [
...stepUtils.goToAppSteps('crm.crm_menu_root'),
{
trigger: 'button[data-menu-xmlid="crm.crm_menu_config"]',
run: "click",
}, {
trigger: 'a[data-menu-xmlid="crm.crm_team_config"]',
run: "click",
}, {
trigger: 'button.o_list_button_add',
run: "click",
}, {
trigger: 'input[id="name_0"]',
run: "edit My CRM Team",
}, {
trigger: '.btn.o-kanban-button-new',
run: "click",
}, {
trigger: 'div.modal-dialog tr:contains("Test Salesman") input.form-check-input',
run: 'click',
}, {
trigger: 'div.modal-dialog tr:contains("Test Sales Manager") input.form-check-input',
run: 'click',
}, {
trigger: 'div.modal-dialog tr:contains("Test Sales Manager") input.form-check-input:checked',
}, {
trigger: '.o_selection_box:contains(2)',
}, {
trigger: 'button.o_select_button',
run: "click",
},
...stepUtils.saveForm()
]});

View File

@@ -0,0 +1,25 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add('crm_email_and_phone_propagation_edit_save', {
url: '/odoo',
steps: () => [
stepUtils.showAppsMenuItem(),
{
trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]',
content: 'open crm app',
run: "click",
}, {
trigger: '.o_kanban_record:contains(Test Lead Propagation)',
content: 'Open the first lead',
run: 'click',
},
{
trigger: ".o_form_editable .o_field_widget[name=email_from] input",
},
{
trigger: ".o_form_button_save:not(:visible)",
content: 'Save the lead',
run: 'click',
},
]});

View File

@@ -0,0 +1,93 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
const today = luxon.DateTime.now();
registry.category("web_tour.tours").add('crm_forecast', {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
trigger: ".o_app[data-menu-xmlid='crm.crm_menu_root']",
content: "open crm app",
run: "click",
}, {
trigger: '.dropdown-toggle[data-menu-xmlid="crm.crm_menu_report"]',
content: 'Open Reporting menu',
run: 'click',
}, {
trigger: '.dropdown-item[data-menu-xmlid="crm.crm_menu_forecast"]',
content: 'Open Forecast menu',
run: 'click',
}, {
trigger: '.o_column_quick_create',
content: 'Wait page loading',
}, {
trigger: ".o-kanban-button-new",
content: "click create",
run: 'click',
}, {
trigger: ".o_field_widget[name=name] input",
content: "complete name",
run: "edit Test Opportunity 1",
}, {
trigger: ".o_field_widget[name=expected_revenue] input",
content: "complete expected revenue",
run: "edit 999999",
}, {
trigger: "button.o_kanban_edit",
content: "edit lead",
run: "click",
}, {
trigger: "div[name=date_deadline] button",
content: "open date picker",
run: "click",
}, {
trigger: "div[name=date_deadline] input",
content: "complete expected closing",
run: `edit ${today.toFormat("MM/dd/yyyy")}`,
}, {
trigger: "div[name=date_deadline] input",
content: "click to make the datepicker disappear",
run: "click"
}, {
trigger: '.o_back_button',
content: 'navigate back to the kanban view',
tooltipPosition: "bottom",
run: "click"
}, {
trigger: ".o_kanban_record:contains('Test Opportunity 1')",
content: "move to the next month",
async run({ queryAll, drag_and_drop }) {
const undefined_groups = queryAll('.o_column_title:contains("None")').length;
await drag_and_drop(`.o_opportunity_kanban .o_kanban_group:eq(${1 + undefined_groups})`);
},
}, {
trigger: ".o_kanban_record:contains('Test Opportunity 1')",
content: "edit lead",
run: "click"
}, {
trigger: "div[name=date_deadline] button",
content: "open date picker",
run: "click",
}, {
trigger: ".o_field_widget[name=date_deadline] input",
content: "complete expected closing",
run: `edit ${today.plus({ months: 5 }).startOf("month").minus({ days: 1 }).toFormat("MM/dd/yyyy")} && press Escape`,
}, {
trigger: "button[name=action_set_won_rainbowman]",
content: "win the lead",
run:"click"
}, {
trigger: '.o_back_button',
content: 'navigate back to the kanban view',
tooltipPosition: "bottom",
run: "click"
}, {
trigger: '.o_column_quick_create.o_quick_create_folded div',
content: "add next month",
run: "click"
}, {
trigger: ".o_kanban_record:contains('Test Opportunity 1'):contains('Won')",
content: "assert that the opportunity has the Won banner",
}
]});

View File

@@ -0,0 +1,119 @@
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add("crm_rainbowman", {
url: "/odoo",
steps: () => [
stepUtils.showAppsMenuItem(),
{
trigger: ".o_app[data-menu-xmlid='crm.crm_menu_root']",
content: "open crm app",
run: "click",
},
{
trigger: "body:has(.o_kanban_renderer) .o-kanban-button-new",
content: "click create",
run: "click",
},
{
trigger: ".o_field_widget[name=name] input",
content: "complete name",
run: "edit Test Lead 1",
},
{
trigger: ".o_field_widget[name=expected_revenue] input",
content: "complete expected revenue",
run: "edit 999999997",
},
{
trigger: "button.o_kanban_add",
content: "create lead",
run: "click",
},
{
trigger: ".o_kanban_record:contains('Test Lead 1')",
content: "move to won stage",
run: "drag_and_drop (.o_opportunity_kanban .o_kanban_group:has(.o_column_title:contains('Won')))",
},
{
trigger: ".o_reward_rainbow",
},
{
// This step and the following simulates the fact that after drag and drop,
// from the previous steps, a click event is triggered on the window element,
// which closes the currently shown .o_kanban_quick_create.
trigger: ".o_kanban_renderer",
run: "click",
},
{
trigger: ".o_kanban_renderer:not(:has(.o_kanban_quick_create))",
},
{
trigger: ".o-kanban-button-new",
content: "create second lead",
run: "click",
},
{
trigger: ".o_field_widget[name=name] input",
content: "complete name",
run: "edit Test Lead 2",
},
{
trigger: ".o_field_widget[name=expected_revenue] input",
content: "complete expected revenue",
run: "edit 999999998",
},
{
trigger: "button.o_kanban_add",
content: "create lead",
run: "click",
},
{
trigger: ".o_kanban_record:contains('Test Lead 2')",
},
{
// move first test back to new stage to be able to test rainbowman a second time
trigger: ".o_kanban_record:contains('Test Lead 1')",
content: "move back to new stage",
run: "drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(0) ",
},
{
trigger: ".o_kanban_record:contains('Test Lead 2')",
content: "click on second lead",
run: "click",
},
{
trigger: ".o_statusbar_status button[data-value='4']",
content: "move lead to won stage",
run: "click",
},
{
content: "wait for save completion",
trigger: ".o_form_readonly, .o_form_saved",
},
{
trigger: ".o_reward_rainbow",
},
{
trigger: ".o_statusbar_status button[data-value='1']",
content: "move lead to previous stage & rainbowman appears",
run: "click",
},
{
trigger: "button[name=action_set_won_rainbowman]",
content: "click button mark won",
run: "click",
},
{
content: "wait for save completion",
trigger: ".o_form_readonly, .o_form_saved",
},
{
trigger: ".o_reward_rainbow",
},
{
trigger: ".o_menu_brand",
content: "last rainbowman appears",
},
],
});