Community mailing list archives

community@mail.odoo.com

Re: xpath on v9 community

by
Vauxoo S.A. de C.V., Moisés Augusto López Calderón
- 08/23/2016 11:50:15
You could use a parent item and a index by number of items, example:
 <xpath expr="//parent_item_with_name[@name='item_x']/page[2]" position="after"

In this case, the item searched is
<parent_item_with_name name="item_x">
   <page string="0"></page>
   <page string="1"></page>
   <page string="2"></page> <!-- this item is searched-->


2016-08-23 10:37 GMT-05:00 Kristian Koci <kristian.koci@gmail.com>:
Hi Community

I'm presenting a problem, and a little confusion about this

As You know, on v9, you can't put 'string' on xpath anymore, but, what if I want to inherit a <page> which has a string as name? ie. <page string="Bill">, and I want to put an element after this page ie. <xpath expr="//page[@name='Bill']" position="after">

If I do this, the page is not found, even being there, because it has not a name, it has a string.

BUT, on the other hand, if I put string on the xpath, it will obviously throw an error.

So, what kind of solution do I need on this situation?

My xpath looks like this <xpath expr="//page[@name='Bill']" position="after"> can't use string either.

Any ideas?

Thanks in advance
--
Kristian Koci
Linux User #582221

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Moisés López Calderón
Vauxoo - OpenERP's Gold Partner
Mobile: (+521) 477-752-22-30
Office: (+52) 477-773-33-46
web: http://www.vauxoo.com
twitter: @vauxoo
           @moylop260