invisible: True/False parameter exist or not in od

2019-09-16 16:19发布

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 ?

1条回答
来,给爷笑一个
2楼-- · 2019-09-16 16:36

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)].

查看更多
登录 后发表回答