Files
odoo_source/addons/resource/static/src/section_one2many_field.js
T
Mathieu Duckerts-Antoine 6a5497c187 [REF] resource: convert section_one2many
This commit converts the old "section_one2many" field to the new
WOWL field API.

closes odoo/odoo#97984

Related: odoo/enterprise#30789
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-29 13:49:11 +02:00

18 lines
538 B
JavaScript

/** @odoo-module */
import { SectionListRenderer } from "./section_list_renderer";
import { registry } from "@web/core/registry";
import { X2ManyField } from "@web/views/fields/x2many/x2many_field";
class SectionOneToManyField extends X2ManyField {}
SectionOneToManyField.components = {
...X2ManyField.components,
ListRenderer: SectionListRenderer,
};
SectionOneToManyField.defaultProps = {
...X2ManyField.defaultProps,
editable: "bottom",
};
registry.category("fields").add("section_one2many", SectionOneToManyField);