Initial commit: Vertical Industry packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit d5567a0017
766 changed files with 733028 additions and 0 deletions

View file

@ -0,0 +1,36 @@
/** @odoo-module **/
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
**/
getActionMenuItems() {
const menuItems = super.getActionMenuItems();
const archiveAction = menuItems.other.find((item) => item.key === "archive");
if (archiveAction) {
archiveAction.callback = () => {
const dialogProps = {
body: this.env._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);

View file

@ -0,0 +1,7 @@
.o_fleet_form {
.oe_stat_button.text-warning, .oe_stat_button.text-danger {
.o_stat_text {
color: $o-main-text-color;
}
}
}