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

make a many2one field invisible when is empty

By
Giovanny Vizcaya
on 3/17/16, 11:45 PM 657 views

Greetings

i'm triying to make invisible a one2many field when it hasn't some data in the field... i tried with

<field name="parent_id" attrs="{'invisible': [(' parent_id ', '=', 'False')]}"/>

but that makes it invisible as same way invisible="True".


How can i solve it?

1

Jignesh Mehta

--Jignesh Mehta--
2087
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 3/18/16, 3:01 AM

Hello Giovanny,


Remove quote from False

Try this :-

<field name="parent_id" attrs="{'invisible': [('parent_id ', '=', False)]}"/>


Hope it works for you.

Thanks,

Doesn't work... same problem... i need it visible when create a new employee, and after saving, if field is empty becomes invisible

Giovanny Vizcaya
on 3/18/16, 10:40 AM

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: 3/17/16, 11:45 PM
Seen: 657 times
Last updated: 3/18/16, 3:01 AM