[FIX] portal: allocate Renderer correctly on new x2many field

The new structure of X2manyField stores ListRenderer in its components.
PortalUserX2ManyField is not using that structure properly. Therefore,
PortalWizardUserListRenderer it is not found nor used correctly.
This commit correctly places that List Renderer in the components.

Task-2968411

closes odoo/odoo#99320

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Noe Antoine
2022-08-31 21:12:08 +02:00
parent 6de39178a5
commit 148976ff6d
@@ -4,11 +4,10 @@ import { PortalWizardUserListRenderer } from "../list/portal_wizard_user_list_re
import { X2ManyField } from "@web/views/fields/x2many/x2many_field";
import { registry } from "@web/core/registry";
export class PortalUserX2ManyField extends X2ManyField {
setup() {
super.setup();
this.Renderer = PortalWizardUserListRenderer;
}
}
export class PortalUserX2ManyField extends X2ManyField {}
PortalUserX2ManyField.components = {
...X2ManyField.components,
ListRenderer: PortalWizardUserListRenderer,
};
registry.category("fields").add("portal_wizard_user_one2many", PortalUserX2ManyField);