Search code examples
pythonpython-2.7odoo-8odoo

invisible: True/False parameter exist or not in odoo 8?


I am new to odoo.

I searched too many blogs. In openerp 7, it has an optional parameter

invisible: True/False

For ex: password = fields.selection([('one','One'),('two','Two')], 'Password', invisible=True)

to hide or show the field in view. Whether still it exists in odoo 8.

UPDATE:

Also I need to clarify existence of domain filter in Odoo 8.

For ex: ... domain="[('fiscalyear_id','=',fiscalyear)]",required=False)

Need your help to clarify on this. Or else anyother parameter used ?


Solution

  • invisible is still existing in version 8. Try to write in any XML view:

    <field name="your_field" invisible="1"/>
    

    For example:

    <field name="password" invisible="1"/>
    

    Besides, you can make a field invisible depending on a condition, as you were able to do in version 7, with attrs:

    <field name="your_field" attrs="{'invisible': domain_you_want}"/>
    

    Where domain_you_want is for example [('another_field', '=', False)].