Openerp 使页面选项卡在继承视图中与域一起动态不可见
我尝试根据模型字段的值使视图中的页面选项卡动态可见。屏幕上可用的字段 我需要更改这是一个继承的视图 我试过:Openerp 使页面选项卡在继承视图中与域一起动态不可见,openerp,openerp-7,Openerp,Openerp 7,我尝试根据模型字段的值使视图中的页面选项卡动态可见。屏幕上可用的字段 我需要更改这是一个继承的视图 我试过: <xpath expr="//page[@string='Functions']" position="attributes"> <attribute name="invisible">[('org_type_id','!=',0)]</attribute> </xpath> [('org\u type\u id','!=',0
<xpath expr="//page[@string='Functions']" position="attributes">
<attribute name="invisible">[('org_type_id','!=',0)]</attribute>
</xpath>
[('org\u type\u id','!=',0)]
但是现在页面选项卡功能总是隐藏的。即使组织类型id为0
难道不能使用xpath添加动态不可见属性吗?这样做完全是错误的 你们可以用下面的方法来完成你们的工作 像这样的东西
<xpath expr="//page[@string='Functions']" position="attributes">
<attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>
{'invisible':[('org_type_id','!=',0)]的
我希望这会对您有所帮助:)
你也应该试试这个
<page string="Functions" position="attributes">
<attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>
</page>
{'invisible':[('org_type_id','!=',0)]的