Odoo Help

4

1
1 Answer
4
Avatar

Eric United States

--Eric--

754
| 6 2 9
Fresno, United States
--Eric--

Software Developer at Mertechdata

Eric United States
3/14/14, 7:37 PM

Your church_id field sounds like it should be related to a church table, but I think you just want to indicate if a partner record is a church or not. I would just create a field called 'is_church' as a boolean, then you can use a domain to filter for any partner records where the is_church value is set to true like this

domain = "[('is_church','=',True)]"

You can get rid of the church_id field because it's not related to a church table. I believe that should work for you. Hope it helps

in your .py file:

_columns{
    'is_church': fields.boolean('Is a Church', domain="[('is_church', '=', True)]")
}
1 Comment
Emanuel Cino Switzerland
3/17/14, 4:25 AM

You're right, I was doing it unnecessarily hard. That's far better so !

Ask a Question
Writer
Keep Informed
3 follower(s)
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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now