不可见:在odoo 8中是否存在True/False参数? [英] invisible: True/False parameter exist or not in odoo 8?
问题描述
我是ood的新手.
我搜索了太多博客.在openerp 7中,它具有可选参数
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)
隐藏或显示视图中的字段.在odoo 8中是否仍然存在.
to hide or show the field in view. Whether still it exists in odoo 8.
更新:
我还需要弄清楚Odoo 8中是否存在域过滤器.
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 ?
推荐答案
invisible
在版本8中仍然存在.尝试在任何XML视图中编写:
invisible
is still existing in version 8. Try to write in any XML view:
<field name="your_field" invisible="1"/>
例如:
<field name="password" invisible="1"/>
此外,您可以根据条件使字段不可见,就像在版本7中使用attrs
一样:
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}"/>
其中 domain_you_want 例如[('another_field', '=', False)]
.
这篇关于不可见:在odoo 8中是否存在True/False参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!