我在树视图中添加了字段move_name,如果有move_name,我想基于过滤器。有移动名称的发票,其中一些没有这样,当我启用过滤器时,应该只有move_names的发票。我尝试将其添加到搜索视图,但我认为我有域的问题。当我点击过滤器时,每张发票都会消失。
<record id="invoice_tree" model="ir.ui.view">
<field name="name">account.invoice.tree</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='number']" position="after">
<field name="move_name"/>
</xpath>
</field>
</record>
<record id="view_account_invoice_filter_contract" model="ir.ui.view">
<field name="name">account.invoice.select.contract</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<filter name="draft" position="before">
<filter string="Move" name="move" domain="[('move_name','=','True')]"/>
</filter>
</field>
</record>
答案 0 :(得分:1)
问题是该域名应为domain =“[('move_name','!=','False')]”