我在Odoo中为res.partner创建了一个新的搜索视图。我添加了自定义过滤器。现在我只想删除我的父搜索视图中的预定义过滤器(我的合作伙伴公司客户供应商)
我尝试使用xpath并隐藏客户,但它不起作用。
(0, initial)
答案 0 :(得分:1)
事实上,答案是将字段隐藏起来,单独并将新字段放在
之间<search string="Search Partner"> </search>
这是完整的搜索视图
<record id="view_odepo_filter" model="ir.ui.view">
<field name="name">res.partner.select.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<!-- Fields to Delete -->
<filter string="Customers" name="customer" domain="[('customer','=',1)]" help="Customer Partners" position="replace"/>
<filter string="Suppliers" name="supplier" domain="[('supplier','=',1)]" help="Supplier Partners" position="replace"/>
<!-- Fields to Add -->
<search string="Search Partner">
<filter string="Vendeurs" name="seller" domain="[('isSeller','=',1)]" help="Liste Vendeur"/>
<filter string="Fournisseurs" name="supplier" domain="[('isSupplier','=',1)]" help="Liste Fournisseurs"/>
<filter string="Intermediares" name="interm" domain="[('isMiddle','=',1)]" help="Liste Intermdiaires"/>
<filter string="Backoffices" name="back" domain="[('isBackOffice','=',1)]" help="Liste BackOffice"/>
</search>
</field>
</record>