Odoo Help


how to use domain in many2one field?

willie ho
on 10/23/14, 4:09 AM 878 views

I am making a many2one field using domain to control the records.

what should I put to my file if the domain is using a value from the form but not hard code?

Dércio Duvane
On 10/23/14, 5:16 AM

If it's not hard coded, you put the domain statement on the XML, i.e:

<field name="sequence_id" domain="[('documento_tipo_id','=',doc_type)]" />


doc_type and sequence_id are many2one objects on my form

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: 10/23/14, 4:09 AM
Seen: 878 times
Last updated: 3/16/15, 8:10 AM