Odoo Help


How to create dynamic domain on many2one fields with onchange function?

on 9/11/13, 6:25 AM 3,331 views

two fields many2one both are different form form-1 1.plan_category plan-1 plan-2 form-2 2.sub_pan sub plan-1 sub plan-2

in third form select plan category in onchange event on display subplan

--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 9/11/13, 8:15 AM


I just understood the title :D,

So, the onchange function can return a domain like:

res = {'domain': {'field_name': [domain like ('id', 'in', list_of_ids)]}}
return res

So every time this function is called you can do your calculation and pass the result to the domain...

I hope this could helps you ...


thanks sir

on 9/13/13, 5:16 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: 9/11/13, 6:25 AM
Seen: 3331 times
Last updated: 3/27/15, 8:14 PM