Skip to content

fix(module): drop clear_caches() outright (adopts #237) - #279

Merged
bosd merged 1 commit into
masterfrom
fix/237-remove-clear-caches
Aug 18, 2026
Merged

fix(module): drop clear_caches() outright (adopts #237)#279
bosd merged 1 commit into
masterfrom
fix/237-remove-clear-caches

Conversation

@bosd

@bosd bosd commented Aug 18, 2026

Copy link
Copy Markdown
Member

#236 was already fixed in #266 (merged) by guarding clear_caches() in a try/except, plus fixing the secondary read()-shape TypeError that #237 left open. This PR adopts bosd's cleaner approach from #237: drop the clear_caches() call entirely.

Rationale (bosd's, and sound): the method was removed from the ORM's RPC surface in Odoo 19 and is unnecessary on every versionupdate_list() commits server-side and the following search_count([]) is a fresh read that already reflects the new state. Removing it is version-safe and avoids a wasted, always-failing round-trip on every Odoo 19 update-list (which the guard still incurred).

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

Supersedes and closes #237. (The read() TypeError half of #236 stays fixed from #266.)

#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.
@bosd
bosd merged commit c880b71 into master Aug 18, 2026
28 checks passed
@bosd
bosd deleted the fix/237-remove-clear-caches branch August 18, 2026 10:13
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.

1 participant