Video summary
¿Odoo va lento? El error fatal del @api.depends (compute field)
Main summary
Key takeaways
Summary (Technological Concepts / Product Analysis)
- The video discusses how to work efficiently with “calculated fields” (computed fields) in Odoo, focusing less on the compute logic itself and more on the
@api.dependsdecorator. - Key concept:
@api.dependscontrols when the computed field is triggered and recalculated.- In the example, an AI-created computed field assigns a commission rule.
- The computed field should recompute only when the relevant commercial data changes (e.g., when the “commercial”/sales-related fields change).
- With dependencies defined correctly, recalculation doesn’t happen unnecessarily, which is crucial for performance.
Performance Issue / Common Cause
- If
@api.dependsis not defined properly, the computed field can execute more often than needed. - This leads to real-world symptoms like: “Odoo is slow for me.”
- The creator claims this is a frequent, practical cause of slowness.
Best-Practice Approach / Reference to Odoo Standards
- Instead of relying only on auto-generated code, the speaker examines how Odoo implements similar fields.
- Example used: the
user_idfield, which depends on the client; selecting a client automatically assigns the corresponding salesperson. - The recommendation is to replicate proven Odoo behavior in custom fields so the implementation aligns with official development standards, not just correctness.
Main Speaker(s) / Sources
- The speaker draws on personal experience and client feedback (e.g., “Clients have told me…”).
- They also use Odoo’s built-in field behavior (such as
user_iddepending on client) as the primary reference point for best practices.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.