FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Beyond the Syntax: How onchange, depends and inverse Really Work in Odoo
NewsProgramming Languages

Beyond the Syntax: How onchange, depends and inverse Really Work in Odoo

via Dev.to PythonBorovlev Artem1mo ago

The Problem Ask any Odoo developer to explain the difference between @api.depends and @api.onchange , and you'll get some version of the same answer: "onchange is for the UI - it fires when the user changes a field in the form. depends is for computed fields - it runs when you save." It's not wrong. But it's incomplete in ways that matter. And that incompleteness quietly causes bugs, unnecessary code, wasted debugging hours, and team arguments about why something "sometimes works and sometimes doesn't." Here's what that incomplete understanding looks like in practice: a developer notices that a computed field isn't updating in the form view, so they add @api.onchange on top of @api.depends . It works. They ship it. Nobody questions it. Six months later someone else looks at that code and wonders: do we need both? what does each one actually do here? Or a developer implements two fields that should stay in sync - change one, the other updates automatically. They set up compute and inver

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
30 views

Related Articles

The Artemis Moon base project is legally dubious
News

The Artemis Moon base project is legally dubious

The Verge • 14h ago

The HP OmniBook 5 Is a MacBook Neo Killer, and It's Only $500
News

The HP OmniBook 5 Is a MacBook Neo Killer, and It's Only $500

Wired • 14h ago

Trump defunding of NPR and PBS blocked by judge, but damage is already done
News

Trump defunding of NPR and PBS blocked by judge, but damage is already done

Ars Technica • 15h ago

Everything is iPhone now
News

Everything is iPhone now

The Verge • 15h ago

Terms & Conditions: Soundboks Giveaway
News

Terms & Conditions: Soundboks Giveaway

Wired • 15h ago

Discover More Articles