[FIX] web: x2many fields: set display name and correct supported types

Before this commit, the X2ManyField did not have a display name and its supported
types only mentioned one2many.

After this commit, those fields have a display name and the type many2many
is rightfully put has beng handled by the fields.

Part-of: odoo/odoo#107233
This commit is contained in:
Lucas Perais
2022-12-06 07:01:41 +01:00
parent fb2132719c
commit b50fec6aa9
@@ -15,6 +15,7 @@ import { standardFieldProps } from "@web/views/fields/standard_field_props";
import { KanbanRenderer } from "@web/views/kanban/kanban_renderer";
import { ListRenderer } from "@web/views/list/list_renderer";
import { evalDomain } from "@web/views/utils";
import { _lt } from "@web/core/l10n/translation";
import { Component } from "@odoo/owl";
@@ -233,7 +234,8 @@ X2ManyField.props = {
addLabel: { type: "string", optional: true },
editable: { type: "string", optional: true },
};
X2ManyField.supportedTypes = ["one2many"];
X2ManyField.supportedTypes = ["one2many", "many2many"];
X2ManyField.displayName = _lt("Relational table");
X2ManyField.template = "web.X2ManyField";
X2ManyField.useSubView = true;
X2ManyField.extractProps = ({ attrs }) => {