Odoo Help


2 questions about domain and many2one

willie ho
on 10/23/14, 9:45 PM 502 views

1. How to use value from the form for domain? I wrote (domain="[('categ_id','=',product_category)]") and I created a field called product_category. However, I got an error (Uncaught Error: NameError: name 'product_category' is not defined) when I use select the many2one field. 

2. How to check data from FormB but displaying data from FormA when FormA and FormB has a relation? Or do I need another function to do it?

Could you elaborate your question or paste a bit of code...

on 10/24/14, 2:17 AM
Pau Ubach
On 10/23/14, 10:06 PM

Could you please paste a bit of code?

1. 'categ_id' should be a field in the table many while product_category should be in the table one.

2. You can use relational fields to get the info from FormA in formB.

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 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

3 follower(s)


Asked: 10/23/14, 9:45 PM
Seen: 502 times
Last updated: 3/16/15, 8:10 AM