Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何在销售订单搜索菜单中删除默认过滤器并添加新过滤器(视图名称:sale.order.search.inherit.sale)_Xml_Odoo 10 - Fatal编程技术网

Xml 如何在销售订单搜索菜单中删除默认过滤器并添加新过滤器(视图名称:sale.order.search.inherit.sale)

Xml 如何在销售订单搜索菜单中删除默认过滤器并添加新过滤器(视图名称:sale.order.search.inherit.sale),xml,odoo-10,Xml,Odoo 10,版本:奥多10 原始文件:(sale_views.xml) sale.order.search.inherit.sale 销售订单 主要的,重要的 继承此视图时我应该做什么? 如何删除或隐藏所有默认过滤器? 替换筛选器字符串时出现问题…我尝试如下操作: <xpath expr="//filter[@string='Upselling']" position="replace"/> 但是有一个错误是这样的: <xpath expr="//filter[@string='

版本:奥多10 原始文件:(sale_views.xml)


sale.order.search.inherit.sale
销售订单
主要的,重要的
继承此视图时我应该做什么? 如何删除或隐藏所有默认过滤器? 替换筛选器字符串时出现问题…我尝试如下操作:

<xpath expr="//filter[@string='Upselling']" position="replace"/>

但是有一个错误是这样的:

<xpath expr="//filter[@string='Upselling']" position="replace"/>
视图继承不能将属性“string”用作选择器

有解决办法吗


提前感谢:)

在域中尝试xpath。引发此错误的原因是xml节点中定义的字符串属性容易被翻译,并且xpath应该在多个lang中以同一字符串为目标,这是不受支持的

像这样的方法应该会奏效:

<xpath expr="//filter[@domain='[(\'invoice_status\',\'=\',\'upselling\')]']" position="replace"/>

或者更简单:

<filter domain="[('invoice_status','=','upselling')]" position="replace"/>

尝试在继承视图中删除筛选器