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>
BIN
frontend/fleet/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
1
frontend/fleet/static/description/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"><path d="M30 25a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z" fill="#1AD3BB"/><path fill-rule="evenodd" clip-rule="evenodd" d="M50 25c0 13.807-11.193 25-25 25S0 38.807 0 25 11.193 0 25 0s25 11.193 25 25ZM19.577 43.215C20.696 40.136 22 35.568 22 31h6c0 4.568 1.304 9.136 2.423 12.215a19.042 19.042 0 0 0 12.792-12.792C40.136 29.304 35.568 28 31 28v-6c4.568 0 9.136-1.304 12.215-2.423C40.88 11.726 33.609 6 25 6S9.12 11.726 6.785 19.577C9.864 20.696 14.432 22 19 22v6c-4.568 0-9.136 1.304-12.215 2.423a19.042 19.042 0 0 0 12.792 12.792Z" fill="#985184"/><path fill-rule="evenodd" clip-rule="evenodd" d="M25 34a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-4a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z" fill="#712258"/></svg>
|
||||
|
After Width: | Height: | Size: 767 B |
BIN
frontend/fleet/static/description/icon_hi.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
frontend/fleet/static/img/brand_abarth-image.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/fleet/static/img/brand_acura-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_alfa-image.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
frontend/fleet/static/img/brand_audi-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_austin-image.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
frontend/fleet/static/img/brand_bentley-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_bmw-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_bugatti-image.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
frontend/fleet/static/img/brand_buick-image.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
frontend/fleet/static/img/brand_byd-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_cadillac-image.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/fleet/static/img/brand_chevrolet-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_chrysler-image.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
frontend/fleet/static/img/brand_citroen-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_corre-la-licorne-image.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/fleet/static/img/brand_daewoo-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_dodge-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_ferrari-image.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
frontend/fleet/static/img/brand_fiat-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_ford-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_gmc-image.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
frontend/fleet/static/img/brand_holden-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_honda-image.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
frontend/fleet/static/img/brand_hyundai-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_infiniti-image.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
frontend/fleet/static/img/brand_isuzu-image.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
frontend/fleet/static/img/brand_jaguar-image.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
frontend/fleet/static/img/brand_jeep-image.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
frontend/fleet/static/img/brand_kia-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_koenigsegg-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_lagonda-image.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
frontend/fleet/static/img/brand_lamborghini-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_lancia-image.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/fleet/static/img/brand_land-rover-image.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
frontend/fleet/static/img/brand_lexus-image.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
frontend/fleet/static/img/brand_lincoln-image.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
frontend/fleet/static/img/brand_lotus-image.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
frontend/fleet/static/img/brand_maserati-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_maybach-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_mazda-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_mercedes-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_mg-image.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/fleet/static/img/brand_mini-image.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
frontend/fleet/static/img/brand_mitsubishi-image.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
frontend/fleet/static/img/brand_morgan-image.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
frontend/fleet/static/img/brand_nissan-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_oldsmobile-image.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
frontend/fleet/static/img/brand_opel-image.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
frontend/fleet/static/img/brand_peugeot-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
frontend/fleet/static/img/brand_pontiac-image.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
frontend/fleet/static/img/brand_porsche-image.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
frontend/fleet/static/img/brand_rambler-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_renault-image.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
frontend/fleet/static/img/brand_rolls-royce-image.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
frontend/fleet/static/img/brand_saab-image.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/fleet/static/img/brand_scion-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_skoda-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_smart-image.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
frontend/fleet/static/img/brand_steyr-image.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
frontend/fleet/static/img/brand_subaru-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_suzuki-image.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
frontend/fleet/static/img/brand_tesla-motors-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_toyota-image.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/fleet/static/img/brand_trabant-image.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/fleet/static/img/brand_volkswagen-image.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
frontend/fleet/static/img/brand_volvo-image.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/fleet/static/img/brand_willys-image.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
32
frontend/fleet/static/src/js/fleet_form.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { FormController } from "@web/views/form/form_controller";
|
||||
import { formView } from "@web/views/form/form_view";
|
||||
|
||||
export class FleetFormController extends FormController {
|
||||
/**
|
||||
* @override
|
||||
**/
|
||||
getStaticActionMenuItems() {
|
||||
const menuItems = super.getStaticActionMenuItems();
|
||||
menuItems.archive.callback = () => {
|
||||
const dialogProps = {
|
||||
body: _t(
|
||||
"Every service and contract of this vehicle will be considered as archived. Are you sure that you want to archive this record?"
|
||||
),
|
||||
confirm: () => this.model.root.archive(),
|
||||
cancel: () => {},
|
||||
};
|
||||
this.dialogService.add(ConfirmationDialog, dialogProps);
|
||||
};
|
||||
return menuItems;
|
||||
}
|
||||
}
|
||||
|
||||
export const fleetFormView = {
|
||||
...formView,
|
||||
Controller: FleetFormController,
|
||||
};
|
||||
|
||||
registry.category("views").add("fleet_form", fleetFormView);
|
||||
21
frontend/fleet/static/src/scss/fleet_form.scss
Normal file
@@ -0,0 +1,21 @@
|
||||
.o_fleet_form_view .o_form_renderer {
|
||||
|
||||
.oe_stat_button.text-warning,
|
||||
.oe_stat_button.text-danger {
|
||||
.o_stat_text {
|
||||
color: $o-main-text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_fleet_narrow_field {
|
||||
max-width: 14rem;
|
||||
|
||||
.o_fleet_odometer_value {
|
||||
max-width: 6rem;
|
||||
}
|
||||
|
||||
.o_fleet_odometer_unit {
|
||||
max-width: 3rem;
|
||||
}
|
||||
}
|
||||