original file :(sale_views.xml)
<record id="sale_order_view_search_inherit_sale" model="ir.ui.view">
<field name="name">sale.order.search.inherit.sale</field>
<field name="model">sale.order</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='my_sale_orders_filter']" position="after">
<separator/>
<filter string="Sales" name="sales" domain="[('state','in',('progress','done'))]" />
<separator/>
<filter string="To Invoice" domain="[('invoice_status','=','to invoice')]" />
<filter string="Upselling" domain="[('invoice_status','=','upselling')]" />
</xpath>
</field>
</record>
what should i do while inheriting these view?
how can i remove or hide all the default filters.
there is problem replacing filter string....i tried just like these
<xpath expr="//filter[@string='Upselling']" position="replace"/>
got an error like these,
View inheritance may not use attribute 'string' as a selector.
Is there a solution?
Thanks in advance:)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
6507
Views
Hi,
In the XPath, you cannot use attribute string as the selector. You have to use the name instead of the string.
<xpath expr="//filter[@name='name']" position="replace"/>
As there is no name for the filter that you are trying to replace, you can replace with the position.
<xpath expr="//filter[4]" position="replace"/>
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up