Skip to content

pyvelm v0.2.7

Release date: 2026-05-23
Base module: 0.18.0 (unchanged)

Core ORM hardening: domain compiler fixes for __or__ with collection paths, and Many2one cache invalidation when a referenced record is unlinked.


Highlights

Registry._m2o_referrers_index maps each comodel to Many2one fields that point at it. On unlink():

  • ON DELETE SET NULL — FK cleared in env.cache; parent One2many tuples invalidated (including the old parent).
  • ON DELETE CASCADE — referring rows’ caches dropped before the DB cascade runs.

__or__ + collection domains

Search domains like:

[("__or__", "=", [
    ("tag_ids.name", "ilike", "%vip%"),
    ("name", "ilike", "%vip%"),
])]

now compile collection sub-leaves with EXISTS (same as top-level tag_ids.name leaves).

Tests

python3 -m pyvelm.tests.test_domain -v   # compile tests need no DB

Integration test for comodel unlink cache requires PYVELM_DSN.


Install

pip install pyvelm==0.2.7

Development from this repo:

pip install -e .

Upgrade from v0.2.6

  1. pip install -U pyvelm (or pip install -e .)
  2. Restart app / cron workers

No schema changes.


Full diff: v0.2.6…v0.2.7