Skip to Content
Menu
This question has been flagged
1 Reply
2669 Views

Hi, i tried to modify the menu toggle title inheriting website.user_navbar. But i got the follow error:

the element '' Cannot be located in parent view


Seeing the template "user_navbar" i saw that

    is present. Following, you can see my code:


xml version="1.0" encoding="utf-8"?>
<
odoo>
<template id="dondi_user_navbar" inherit_id="website.user_navbar">
<xpath expr="//ul['id=oe_applications']" position="replace">
<a href="#" class="fa fa-th o_menu_toggle" title="[Text here]" aria-label="
"[Text here]"
"/>
xpath>
<
xpath expr="//ul[hasclass('o_menu_sections')]" position="before">
<div class="o_menu_brand">Websitediv>
xpath>
template>
odoo>


Avatar
Discard
Best Answer

Hi,
 
While we xpath an element the syntax for specifying id is @id and for class is hasclass.
Here the first xpath expression was given as 

<xpath expr="//ul['id=oe_applications']" position="replace"> 


which should be replaced as 

<xpath expr="//ul[@id=’oe_applications']" position="replace">

 

By replacing this line of code we can solve the error.

Regards

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
2
4
Mar 24
1664
1
Oct 23
3667
1
Sep 22
1322
1
Jun 22
4914