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

[FIX] attribute_set: Force load of attributes #170

Closed
wants to merge 2 commits into from

Conversation

lmignon
Copy link
Contributor

@lmignon lmignon commented Aug 28, 2023

Add all the attributes defined for the model into the list of fields to load to display the form view. Wihout this change a JS error occurs when displaying the form view of a x2many field for a model defining attributes. The origin of the error comes from the the get_views method which is called for the type 'form' only. In this case it's important to add all the custom attributes to the list of fields defined on the model for the view. When the same method is called without restriction it will load all the views. Since odoo include all the fields defined on the model for the search view, the error doesn't occur when using the form view from a menu action.

@lmignon
Copy link
Contributor Author

lmignon commented Aug 28, 2023

ping @sbejaoui

Add all the attributes defined for the model into the list of fields to load to display the form view. Wihout this change a JS error occurs when displaying the form view of a x2many field for a model defining attributes. The origin of the error comes from the the get_views method which is called for the type 'form' only. In this case it's important to add all the custom attributes to the list of fields defined on the model for the view. When the same method is called without restriction it will load all the views. Since odoo include all the fields defined on the model for the search view, the error doesn't occur when using the form view from a menu action.
Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@simahawk
Copy link
Contributor

@lmignon both commits are into #171 I guess we can close this one as the other one is getting merged, right?

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 17, 2024
@github-actions github-actions bot closed this Apr 21, 2024
@lmignon lmignon deleted the 16.0-fix-attribute-set branch April 22, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants