Odoo Help


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.


Problem XML View Architecture

Antonio Soriano Marco
on 7/10/13, 5:16 PM 2,141 views

Hi, I'm trying to hide a page in a inherit view, with this sentence:

<page string="Sales & amp; Purchases " position="replace"/>

There is a blank space between & and amp here in the message because of the syntax, but in the xml file there is no blank space.

The question is that when i try to load the xml view, i have this error:

"Invalid XML for View Architecture!"

I have other sentences hiding other pages, and i have no problem, for example:

<page string="Accounting" position="replace"/>

The only problem is with the ampersand sign. Then i'm trying to hide this page with xpath expression, because in xpath i have no problem with ampersand, but Somebody knows how to do that? I mean, fix the ampersand error or hide it with xpath expression? Here is my path expression, its only a test to see if ampersand works, and it works!!! <xpath expr="/form/sheet/notebook/page[@string='Sales & Purchases']" position="inside"> <label string="test de label"/> </xpath>


It doesn't work, the problem is in the "string" attribute. In this case, the string value is "Sales & Purchases", and i get an error when i put an ampersand in the string value, even with the format & amp;

On 7/11/13, 4:14 AM

hi antonio, try:

<page string="Sales" position="attributes"> <attribute name="invisible">1</attribute> </page>

maybe my post can help. (i dont have sufficient karma to post link, please search Set a notebook page invisible in inherited view in the forum. )


Grover Menacho

--Grover Menacho--
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 7/11/13, 5:24 PM

I don't know where are you wanting to hide this anyways do this:

<xpath expr="//page[@string='Sales &amp; Purchases']" position="replace"/>

Or maybe this can work too:

<xpath expr="//page[@string='Sales & Purchases']" position="replace"/>

You only have to write the phrase as is in the XML

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

0 follower(s)


Asked: 7/10/13, 5:16 PM
Seen: 2141 times
Last updated: 3/16/15, 8:10 AM