Odoo Ayuda

1

0
13 Respuestas
1
Tatorus Francia
25/2/16 8:49

I replaced this :

<button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" position="before">

by :

<xpath expr="/form/header/button[@name='button_draft']" position="before">

I'm not sure if it works well but there is no more error now.

5

Hello, Gays I am also facing the same problem. 

But I find proper solution for XPATH Problem

Odoo V9 do not use string selector for adding the page by XPath. 


like.

you should always use name selector place of string selector.


<xpath expr="//page[@name='report']" position="after">


but this selector are applicable only for that page which has name selector


like.

<page name="report" string="Report Configuration">

But if you want to add a page or a field after or inside page that page does not have name selector.


like.


<page string="Order Lines">

In this condition, you have to use.


<xpath expr="//page[1]" position="after">

so on ...

1,2,3... based on page number  


<xpath expr="//page[2]" position="after">

I think this will help you to solve the XPath problem in Odoo V9.

1 Comentario
Nicolas de Moreau Bélgica
13/5/18 15:33

Thank you for this explanation. Any clue why they use 1 for the first page instead of 0, as it is common practice for arrays?

0
Kiran India
3/7/19 6:50

You can simply solve this error. you want to take your field name like name="abc_id" 

<xpath expr="//field[@name='abc_id']" position="attributes">

<attribute name="string">New String Name</attribute>

</xpath>

I hope it will help You :)


0

Old Post but great help!!
I very much appreaciate help or questions that are followed by small code snippets how the actual solution looks like...

In my case, I liked to add a new notebook page right behind the 1st (Order LInes).
Guess that one is a pretty common situation.
Just copy paste of the snippet solved that on for me.
Thumbs Up!

0
samer alsarhan Kuwait
23/2/16 14:25

the problem not from the mentioned code you probably using xpath to access a location inside an inherited view, and in your xpath your depending on @string , which is not allowed

-2

hi,

I got the same error while migrating one customized module from odoo version 8 to odoo version 9.because in 8 i used <xpath expr="//notebook/page[@string='Information']" position="after"> like  i solve this with replacing     <xpath expr="//notebook[last()]" position="inside">

definately you should use notebook  in view   may be,

if you need help conatct:- virzoteck@gmail.com

Realizar una pregunta
Writer
Etiquetas
Keep Informed
0 seguidor(es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now