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

[10.0] [IMP] web_tree_many2one_clickable. Default false. #1088

Conversation

NL66278
Copy link
Contributor

@NL66278 NL66278 commented Oct 22, 2018

Having this module not set all Many2one fields clickable by default, greatly increases the
possibility to reuse the functionality in other OCA modules.

For instance I would like to make partner_multi_relation more user friendly, with the possibility to click on the partner fields in a relation list view to go directly to the partner. The widget is ideal for this, but I can not/should not force all users of partner_multi_relation to have all of their Many2one fields clickable.

I think the same would go for other OCA modules that would like to use these widgets.

Having this module not set all Many2one fields clickable by default, greatly increases the
possibility to reuse the functionality in other OCA modules.
@pedrobaeza
Copy link
Member

I prefer to have it to True, as I install it for having that behavior. What we should do is to be less invasive with something like #1041

@NL66278
Copy link
Contributor Author

NL66278 commented Oct 22, 2018

@pedrobaeza I agree that the less invasive method would certainly help, but this PR still has issues and is not merged yet.

My point is that if you specifically (and presumably manually) install this module, it is easy to set the default to True. But if the module is installed as a prerequisite for other modules, in order to use the many2one_clickable widget where appropriate, many users might be very surprised that all their views suddenly changed their appearance and workings.

@pedrobaeza
Copy link
Member

Well, I prefer to stay this way, as it's the same to you to disable after installing whatever, but let's see what others say.

@tarteo
Copy link
Member

tarteo commented Oct 23, 2018

My point is that if you specifically (and presumably manually) install this module, it is easy to set the default to True.

It's also easy to set it to False after installation. I expect when I install this module it to be active by default.

@simahawk
Copy link
Contributor

me too :)
FTR this setting is totally ignored in v11

@simahawk simahawk closed this Oct 23, 2018
@NL66278
Copy link
Contributor Author

NL66278 commented Oct 23, 2018

It is not about the manual installation of the module. Of course I understand it is as easy to set the value to False as it is to set it to True. But you can NOT use the module AS IS as a prerequisite for other modules, to use the many2one_clickable widget, because that would change all views in the whole system AS A SIDE EFFECT.

So if the maintainers of this module do not want to change the default - and as maintainers of course it is up to them - I will propose to split the functionality of this module in two parts. A base web_tree_many2one_clickable_widget module to contain the widget and the parameter, and the original module, that will depend on the base module but only contains code to set the parameter to True (on installation).

Would this be an acceptable solution?

@simahawk
Copy link
Contributor

@NL66278 if the issue is to disable/enable this on demand per model or per context I'd suggest you to propose an improvement in this direction. Make the widget read a param (from ctx or config or model attr) to turn on/off the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants