Skip to content

pyvelm v0.2.3

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

Adds Odoo-style related fields and readonly on model field declarations.


Highlights

Mirror a value through a dotted path — no SQL column:

company_currency_id = Many2one(
    "res.currency",
    related="company_id.currency_id",
)
  • Read: partner.company_currency_idpartner.company_id.currency_id
  • Write: updating the related field updates the company's currency_id
  • Paths: Many2one hops only (e.g. company_id.currency_id)
  • Types: related field must match the leaf (Many2oneMany2one, etc.)

Field readonly

internal_ref = Char(readonly=True)
  • write() and attribute assignment raise ValueError
  • Edit forms disable the input unless the view sets readonly=False

Install

pip install pyvelm==0.2.3

Upgrade from v0.2.2

  1. pip install -U pyvelm==0.2.3
  2. Restart the app process (models reload on import)
  3. Add related fields to your models as needed — no migration

Full diff: v0.2.2…v0.2.3