Files
odoo_source/addons/resource/static/src/section_one2many_field.js
T
Adrien Dieudonne 42a458f144 [FIX] web, *: x2many list horizontal overflow
Follow-up of https://github.com/odoo/odoo/pull/121468

Since https://github.com/odoo/odoo/commit/9f4622492c5cd84847368d32bf02b0b538a6dd69 (16.2), ´additionalClasses´ has to be added on the field
instead of the component.

closes odoo/odoo#122963

X-original-commit: 82228e65b59427d536f10970cd85610136347ff8
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-05-31 09:23:16 +02:00

22 lines
676 B
JavaScript

/** @odoo-module */
import { SectionListRenderer } from "./section_list_renderer";
import { registry } from "@web/core/registry";
import { X2ManyField, 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", {
...x2ManyField,
component: SectionOneToManyField,
additionalClasses: [...x2ManyField.additionalClasses || [], "o_field_one2many"],
});