Odoo Help


This community 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.


how to use domain in many2one field?

willie ho
on 10/23/14, 4:09 AM 535 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 10/23/14, 4:09 AM
Seen: 535 times
Last updated: 3/16/15, 8:10 AM