-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[11.0] list view: many2one clickable by default #872
Comments
simahawk
changed the title
[11.0] many2one clickable by default
[11.0] list view: many2one clickable by default
Feb 20, 2018
@simahawk thank you! |
This can be closed as the module is merged. |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After wasting a bit of time in try to port
web_tree_many2one_clickable
we discovered that if you put the attributewidget
on the field (no matter if the widget exists or not, yes, evenwidget="foo"
works) you get the nice link. This is because here we have:and the fallback for pure text value:
So, it checks only that
widget
attribute is there and then rely on_renderFieldWidget
which in turns does this:which means that is going to render the correct widget (m2o in this case) after retrieving it from fields info.
So, in the end, to get the m2o widget clickable, just do
widget="many2one"
.Same applies for all the other fields: just specify
widget="the_widget"
. 😉The text was updated successfully, but these errors were encountered: