Skip to content

fix(module): drop clear_caches() call removed in Odoo 19 - #237

Closed
bosd wants to merge 1 commit into
masterfrom
fix/odoo19-module-clear-caches
Closed

fix(module): drop clear_caches() call removed in Odoo 19#237
bosd wants to merge 1 commit into
masterfrom
fix/odoo19-module-clear-caches

Conversation

@bosd

@bosd bosd commented Aug 7, 2026

Copy link
Copy Markdown
Member

Fixes #236.

fluvo module update-list 404s on Odoo 19 because run_update_module_list() calls ir.module.module.clear_caches() over RPC, and that method was removed from the ORM in Odoo 19 (cache handling is now internal / not RPC-exposed). This also cascades into a TypeError in module install.

Fix: remove the clear_caches() RPC call. It's unnecessary — update_list() scans and commits the app list server-side, and the following search_count([]) is a fresh RPC read that already reflects the updated state. Version-safe across Odoo releases (no method that only exists on some versions).

Verified against Odoo 19 (json2s connector): update-list previously 404'd on clear_caches; removing the call lets it complete.

Note: the secondary module install TypeError (module_manager.py list-comprehension over read() results) is tracked in #236 and may warrant a follow-up once update-list is unblocked.

ir.module.module.clear_caches() no longer exists / is not RPC-exposed in
Odoo 19, so 'fluvo module update-list' 404s (and 'install' cascades into a
TypeError). The call is also unnecessary: update_list() scans and commits
server-side, and the following search_count([]) is a fresh RPC read that
already reflects the updated list.

Fixes #236
@bosd

bosd commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Thanks — adopted your removal approach in #279 (rebased onto current master). #236 itself was already closed by #266, which fixed both the clear_caches 404 and the secondary read() TypeError you'd flagged as a follow-up. #279 swaps #266's try/except guard for your cleaner outright removal (no wasted round-trip on Odoo 19). Closing this in favour of #279.

@bosd bosd closed this Aug 18, 2026
bosd added a commit that referenced this pull request Aug 18, 2026
#266 fixed #236 by guarding clear_caches() in try/except; this adopts bosd's
cleaner approach from #237 and drops the call entirely. It was removed from the
ORM's RPC surface in Odoo 19 and is unnecessary on every version — update_list()
commits server-side and the following search_count() is a fresh read — so removing
it is version-safe AND avoids a wasted, always-failing round-trip on Odoo 19.

Tests: update-list no longer calls clear_caches (assert_not_called); dropped the
now-moot 'survives a raising clear_caches' test.

Co-authored-by: bosd <5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>
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.

fluvo module broken on Odoo 19: ir.module.module.clear_caches removed (404 NotFound)

1 participant