Odoo Help


How to dinamically specify domain in many2many field?

Ratmil Torres
on 8/26/14, 9:46 AM 1,167 views

I have set an on_change event for a field (field A) in order to dynamically set a domain in another field (field B). This works perfect except that when creating a new record, field A is already initialized (field A is many2one), the on_change function is not triggered, so field B domain is not set.

Is there an event raised when an insert form (or edit form) is shown?




| 5 3 6
Jakarta, Indonesia
On 8/27/14, 5:34 AM

Even if field A has been initialized, when the form view of that record is opened in edit mode, the on_change will be triggered and domain will be set properly.  Maybe you can share snippets of your code so that the problem can be more clearly understood.

Yes, you are right. My code is ok.

Ratmil Torres
on 8/27/14, 8:37 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

1 follower(s)


Asked: 8/26/14, 9:46 AM
Seen: 1167 times
Last updated: 3/16/15, 8:10 AM