Odoo Help

Welcome!

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.

0

How to use custom models fields for adding attributes to a html component in odoo saas

By
Robin Duqué
on 9/29/14, 4:49 AM 647 views

Hello,

In my res.partner model i added two custom fields:

x_is_company_user: type boolean

x_company_user_id: type integer

I added x_company_user_id  to the view res.partner.form and i want it to be readonly if the field x_is_company_user=True

....

<field name="x_company_user_id" attrs="{'invisible': [('is_company','=', True)],'readonly':[('x_is_company_user','=',True)]}"/>

...

 

But i got the error:

Error: Unknown field x_is_company_user in domain [["x_is_company_user","=",true]]

Someone has an idea? Thanks

 

 

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)

Stats

Asked: 9/29/14, 4:49 AM
Seen: 647 times
Last updated: 3/16/15, 8:10 AM