[ADD] crm_enterprise_remove - #499
Conversation
|
👍 |
|
At least this one hasn't been merged. Please remove the SVG file squashing the commits. |
068cfef to
5eb16bb
Compare
|
svg has been removed. |
|
I wonder: what is the rationale for this? |
|
@dreispt These options are visible to any user with the ability to edit configuration options. This is advertisement in my eyes and Enterprise is not an option for my customers, therefore the options must be removed in order to avoid me having to field annoying questions that have already been answered. |
|
@BMW95 the 9.0 travis build was recently fixed, can you rebase your PR? |
|
@lasley OK I see the reasoning.
With this, you just need to install the central module to enable the enterprise remove feature. |
|
Excellent idea @dreispt - I love it! I have never actually used the auto install feature; does it just trigger when all of the dependencies have been installed or something? |
|
@lasley |
|
@dreispt Oh that's simply sexy - I'm for it. A lot of these modules have already been merged, so we'll need to submit some patches as well. Can you please set the remaining as a WIP? @BMW95 please create a story for yourself in next sprint to complete this update & let me know if you have any questions. |
|
@lasley We can do one thing at a time: let them be merged as they are, and then create a PR with this improvement. |
|
I know I'm late to the party, but I'm a bit concerned about the proliferation of modules here. And with all of them, the ratio between overhead code and code that actually does something is beyond good and evil. |
|
I see your point about module proliferation, but I'm not sure the added complexity by that solution is worth it. This last point reminds me how OCA/server-tools quite a big bag right know, and would surely benefit with the spin-off of a couple new repos.
|
|
@hbrunn That seems like a good idea. Does the _register_hook run automatically when other modules are installed/uninstalled, or would the removal module have to be updated in order for the _register_hook to run? Also how would we load the extra xml files? Would we just open the manifest file with python and add the new views to the data array, or would we have a master xml file, and just append or remove code to that master file? Not really sure. |
|
I am personally with @dreispt on needing to split this repo up. I was somewhat hinting at this with the issue I created before we submitted all these PRs (#493). We have things spanning from LDAP auth, to debranding, to importing ODBC, to Gravatar in this repo. IMO, this feels very much like a dumping ground for modules that don't otherwise have a home. |
|
@BMW95 @dreispt @lasley yes, this repo was and still is used as the if-it-doesnt-fit-anywhere-else choice, resulting in the current situation. If you have the time to spare, follow the last section of https://odoo-community.org/page/List to set up a new project for more specific repos |
|
@BMW95 a helper module I have in mind for a while, but never wrote might come in handy here: Only depend on a module if it's installed (maybe by a key Allow for stanzas like <if module_installed="modulename1,modulename2">
<!-- this is only executed if above condition applies /-->
</if>In a naive implementation, the latter could be enough, but then we run into nasty situations if the module load order doesn't match, and we can only force this to be correct by manipulating the dependencies table. |
|
@hbrunn Yes, it's not trivial and there can be a few subtleties. |
|
regarding the state of the project, I just started a thread on the tools at odoo-communty.org mailing list. |
5eb16bb to
0be89a0
Compare
|
Hey @BMW95, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
|
He is covered under LasLabs ECLA. @BMW95 please resubmit that commit under your corporate email. |
…nt enterprise settings.
0be89a0 to
b910916
Compare
|
going back to the topic here, 👍 |
|
👍 (we have the off-topics planned) |
|
But what about @hbrunn's proposal of having only one module called |
|
Hmmm. I think so too, especially since having 10 modules that basically all do the same thing is quite clunky. Also if the Odoo xpath function is updated to conditionally return all the items that xpath returns instead of the first-only (maybe by checking a boolean attribute 'return_multiple' on the xpath tag?), then 10 branches will need to be made with 10 pr's just to update the modules that will basically all run the exact same xpath query in the end, just applied to different views. I just realized on the flip-side, if we add conditional xml existence features either as an addon or to the core, would that decrease the maintainability of Odoo as the years progress? I usually take some extra thought when constructing xpath queries. This is to ensure they return the same item regardless of any external changes made to the xml from other module installations. (I'm not 100% sure yet of how all that works, but I do notice that the base view is separated from all inherited views. Perhaps my concern is unfounded since that separation is how Odoo deals with the issue. If that is the case, then the following concerns may be unfounded as well). Adding conditional existence to sections of views could increase that complexity quite a bit. In addition to any current checks, I would also need to check if there are any conditionals in the inherited views, and then also check if there's any conditionals set in the base view. I think that would be okay in a closed environment, but with Odoo being open source and spreading across so many industries and modules, I'm wondering if conditional xml existence could cause some problems. |
|
I agree to the idea of one-module-remove-all option:
|
|
@pedrobaeza interesting idea, it seems we do have ourselves a nice central point for the arch generation in Now that I'm looking at the way this is created, I am wondering if there isn't also already a method determining if a module is Enterprise at this level. The question of how the "Enterprise Only" icon is added to the DOM is the key to this I believe. |
|
Yes, there is! There's a widget that is used for all these fields. It's called 'upgrade_boolean'. We can use this xml attribute to find and remove all the fields with it. |
|
|
|
And there we have it, thanks guys! Looking at this JS, things seem to have gotten significantly easier in terms of theory. This all boils into the defined template & |
|
I still think it's better to remove the field definition at fields_view_get. |
|
True, that would be an actual removal vs. the JS/Qweb approach is really just a hide. We'll implement that direction then. This ticket will be going on backlog for our next sprint, so we can look at completion in ~1 month. This raises two questions:
|
|
my .02 EUR:
|
|
Hah never thought about how exchange rate works with the fact that my thoughts are only worth .02 USD 😛 Good plan though, @BMW95 please close current PRs referencing this one - to be superseded by solution that avoids module proliferation. Please also create us an internal ticket for next sprint, because I forgot to do that. |
|
The single module approach is more concise, but AFAICS it's based on a smart hack, and you know what they say about smart code. I would really like to see a proof of concept for it. |
Syncing from upstream OCA/server-tools (12.0)
This module removes any settings marked as enterprise from the crm res_config view.
Cheers,
Brett
@lasley