Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import {Component} from "@odoo/owl";
import {_t} from "@web/core/l10n/translation";
import {registry} from "@web/core/registry";
import {standardFieldProps} from "@web/views/fields/standard_field_props";
export class OpenTabWidget extends Component {
openNewTab(ev) {
ev.stopPropagation();
}
_getReference() {
return `/odoo/${this.props.record.resModel}/${this.props.record.data.id}`;
}
}
OpenTabWidget.template = "web_widget_open_tab.openTab";
OpenTabWidget.props = {
...standardFieldProps,
title: {type: String, optional: true},
};
export const openTabWidget = {
component: OpenTabWidget,
displayName: _t("Open Tab"),
supportedTypes: ["integer"],
extractProps: () => ({
title: _t("Click to open on new tab"),
}),
};
registry.category("fields").add("open_tab", openTabWidget);