OWL
forms
Contact Statistics Field
Odoo 19 OWL component — Contact Statistics Field (views)
Live preview
Interactive
Source excerpt
web/static/src/views/fields/contact_statistics/contact_statistics.js
import { registry } from "@web/core/registry";
import { standardFieldProps } from "../standard_field_props";
import { _t } from "@web/core/l10n/translation";
import { Component } from "@odoo/owl";
export class ContactStatisticsField extends Component {
static template = "web.ContactStatisticsField";
static props = {
...standardFieldProps,
};
get list() {
return this.props.record.data[this.props.name] || [];
}
}
export const contactStatisticsField = {
component: ContactStatisticsField,
displayName: _t("Contact Statistics"),
supportedTypes: ["json"],
};
registry.category("fields").add("contact_statistics", contactStatisticsField);
Registry / API
- Registry name
ContactStatisticsField- Category
—- Module
web- Slug
contact-statistics-field- Nav group
forms