mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-18 09:32:04 +02:00
2.8 KiB
2.8 KiB
Remove Enterprise Proprietary Modules from Apps
This package is customized to remove Odoo Enterprise promotional modules from the Apps list and keep them from coming back on upgrades.
Summary of Changes
- Stop seeding enterprise promo modules: the Base module no longer loads
data/ir_module_module.xmlthat createdir.module.modulerows withto_buy=True(promotional stubs pointing to Enterprise apps). - Post-init cleanup: upon upgrading
base, we purge any existing promotional entries withto_buy=Trueand a proprietary license. - UI filter: the Apps action (
open_module_tree) now has a domain[("to_buy", "=", False)]so any residualto_buy=Trueentries are hidden in the Apps list.
Files Touched
odoo/addons/base/__manifest__.py- Commented out the line that loaded
data/ir_module_module.xml.
- Commented out the line that loaded
odoo/addons/base/__init__.py- Extended
post_initto deleteir.module.modulerecords matching:to_buy = Truelicense in ['OEEL-1', 'OEEL', 'OPL-1', 'Proprietary']
- Extended
odoo/addons/base/views/ir_module_views.xml- Added a domain on the
open_module_treeaction:[("to_buy", "=", False)].
- Added a domain on the
Why
In vanilla Odoo, base/data/ir_module_module.xml seeds several records flagged with to_buy=True (e.g., Studio, Knowledge, Helpdesk, etc.), which show up in the Apps screen with an Upgrade/Install button but link to Enterprise features. This customization removes those marketing entries to keep the Apps list clean and avoid confusion.
How to Apply
- Upgrade the
basemodule so the manifest change and post-init hook run:- UI: Apps → search
Base→Upgrade. - CLI:
odoo -u base -d <your_db>(or via your wrapper script).
- UI: Apps → search
- Refresh the Apps page. The Enterprise proprietary entries should be gone.
Notes and Caveats
- App list updates: If you use "Update Apps List" pulling from Odoo Apps server, external data could re-introduce promotional entries. With this change, any
to_buy=Trueentries matching proprietary licenses are cleaned up again on the nextbaseupgrade, and the Apps action already hidesto_buy=Trueentries by domain. - Safety: The cleanup runs best-effort inside a
try/exceptto avoid breaking the base post-init. It only targets obvious proprietary licenses.
Rollback
To restore the default behavior:
- Re-enable loading of
data/ir_module_module.xmlinodoo/addons/base/__manifest__.py. - Remove the promo cleanup block from
odoo/addons/base/__init__.pypost_init. - Upgrade
baseagain:odoo -u base -d <your_db>.
Related Paths
- Removed data file (not loaded anymore):
odoo/addons/base/data/ir_module_module.xml - Model implementing Apps logic:
odoo/addons/base/models/ir_module.py
Screenshot Reference
- Original issue context:
input/screenshot-2025-08-23_17-38-34.png