Reputation: 4174
I need to replace some fields,buttons and label in a view. Now i am using Xpath like below to achieve it.
<xpath expr='//field[@name="use_timesheets"]' position="replace"> </xpath>
<xpath expr='//button[@class="oe_inline oe_stat_button"]' position="replace"></xpath>
<xpath expr="//field[@name = 'template_id']" position="replace"></xpath>
Is it possible to use single Xpath for multiple field like:
<xpath expr="//field[@name in ['template_id','name']" position="replace"></xpath>
Is it possible??
Upvotes: 1
Views: 666
Reputation: 89285
It is possible in XPath 2.0 or above :
//field[@name=('template_id','name')]
And in XPath 1.0 using or
operator :
//field[@name='template_id' or @name='name']
I'm not sure which XPath version is supported by odoo.
Upvotes: 1