Skip to content

web_m2x_options module, options="{'open':True}" tree views bug. #2907

@phayasqs

Description

@phayasqs

Hello,

I encountered that this option:
options="{'open':True}" is not working properly on the tree views.

Example
I have field:

<field optional="show" name="something_ids" widget="many2many_tags" options="{'open':True}"/>

When I click on a record, a new form opens but not the active record, only the form for creating a new one.
This happens when we are using this option on tree views. If we have a tree inside a form (purchase order lines inside purchase.order.form) everything is working properly.

in the file form.esm.js we have function async onMany2ManyBadgeClick(event, record)
I noticed that in this particular case 'record.data.id' is empty.

My workaround is adding this statement:

        if (!id) {
            id = record.resId; 
        }

after
var id = record.data.id;

In my opinion, maybe we should just pass to var id -> record.resId.
Unfortunately, I do not have enough time in the near future to test this well, this is why I am reporting this bug.

Kind regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions