Odoo Help

Welcome!

This community 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.

0

Xpath doesn't work anymore

By
Rémy Baron
on 6/7/16, 4:20 AM 229 views

Hello,

I use <xpath> to edit my own invoice/saleorder look and it work correctly.

But when i try with the mrp_repair, nothing .. Any error, just the look of the order stay the same...


This is my view :


<template id="report_repair_document_ht" inherit_id="mrp_repair.report_mrprepairorder">

        <xpath expr="//div[@class='page']" position="replace">

                <div class="page">

                        My code                 

                </div>

        </xpath>

</template> 


Thank you.

can you try going to the original view you want to edit on the front end user interface settings and add an extension view using the inherited views tab? This way you can avoid have to use the template tags and that reduces your space for error.

Alexander Soare
on 6/7/16, 6:24 AM
0
Rémy Baron
On 6/7/16, 5:45 AM

What is understood is, i have to tell the name of my view : "template id="..."

Then the view which i want edit : inherit_id="..."

Then where i want start to edit : xpath expr="..."

And how i want do it : position="..."


So I think my code is OK, and this form work correctly with another view so i don't understand why it doesn't work here ...

0
Alexander Soare
On 6/7/16, 5:26 AM

Why is the template tag outside of the xpath expression? I'm not sure if this is the problem here but I've found that the xpath should be the outermost tag. 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/7/16, 4:20 AM
Seen: 229 times
Last updated: 6/7/16, 5:45 AM