Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phayasqs opened this issue Aug 6, 2024 · 0 comments
Open

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

phayasqs opened this issue Aug 6, 2024 · 0 comments
Labels

Comments

@phayasqs
Copy link

phayasqs commented Aug 6, 2024

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,

@phayasqs phayasqs added the bug label Aug 6, 2024
@phayasqs phayasqs changed the title web_m2x_options options="{'open':True}" web_m2x_options module, options="{'open':True}" tree views bug. Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant