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

梦想的初衷 提交于 2019-12-12 04:59:58

问题


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:


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



来源:https://stackoverflow.com/questions/31532390/invisible-true-false-parameter-exist-or-not-in-odoo-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!