From b50fec6aa95c25bd4f76a86fa2eeb29804ed3fee Mon Sep 17 00:00:00 2001 From: Lucas Perais Date: Fri, 25 Nov 2022 12:29:36 +0000 Subject: [PATCH] [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 --- addons/web/static/src/views/fields/x2many/x2many_field.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/views/fields/x2many/x2many_field.js b/addons/web/static/src/views/fields/x2many/x2many_field.js index 62ee49d8980..11661bf5e7a 100644 --- a/addons/web/static/src/views/fields/x2many/x2many_field.js +++ b/addons/web/static/src/views/fields/x2many/x2many_field.js @@ -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 }) => {