Odoo Help


Handling multiple on_change() methods for the same field

Timo Talvitie, Vizucom Oy
on 11/6/13, 12:48 PM 2,488 views

How would you recommend handling situations where multiple modules define on_change behavior for the same field in the same form?

Let's say we have a module dependency structure like this, and each module has their own on_change() method for the same field:

Module A (in core)

--Module B (a community extension)

--Module C (some additional own customization)

When the on_change of Module C gets triggered, what's the best way to make sure that also A and B's on_change methods get called with their correct parameters? Is it possible to somehow define multiple on_change methods for a single field or are you supposed to call the superclass methods similarly as in create(), write() etc. methods?

do the module A onchange and module B onchange methods have the same method name? If so... I don't think it is possible. Otherwise you can call the A and B onchange methods from within the module C onchange method

on 11/6/13, 1:41 PM

May be You could Call Super of the onchange Functions in module B and Module A inside the onchange definition of Module C.

Subhin P V
on 11/7/13, 3:53 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 11/6/13, 12:48 PM
Seen: 2488 times
Last updated: 12/4/15, 3:26 PM