Odoo Help

0

make a many2one field invisible when is empty

By
Giovanny Vizcaya
on 3/17/16, 11:45 PM 1,011 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--
2206
| 6 5 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

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

Question tools

1 follower(s)

Stats

Asked: 3/17/16, 11:45 PM
Seen: 1011 times
Last updated: 3/18/16, 3:01 AM