在继承视图中使用域使页面选项卡动态不可见

make a page tab dynamic invisible with domain in inherited view

我尝试根据模型字段的值使视图中的页面选项卡动态可见。屏幕上可用的字段。

我需要更改这是一个继承视图

我试过了:

<xpath expr="//page[@string='Functions']" position="attributes">
    <attribute name="invisible">[('org_type_id','!=',0)]</attribute>
</xpath>

但是现在分页标签功能一直是隐藏的。即使 org_type_id 是 0.

难道不能用xpath加动态隐形属性吗?

你做那件事的方式完全错误。

您可以通过以下方式完成您的工作 像这样的东西。

<xpath expr="//page[@string='Functions']" position="attributes">
    <attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>

希望对您有所帮助:)

你也应该试试这个,

<page string="Functions" position="attributes">
    <attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>
</page>