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.


% can't appear on view from xml

on 5/24/13, 9:01 PM 776 views

I want a string like "%%a - Abbreviated Week name" to be put onto form view

but when I enter that: does not work in version 6.1

I fear that its the problem of regular expression.


Mohammad Alhashash

--Mohammad Alhashash--
| 5 5 8
Giza, Egypt
--Mohammad Alhashash--


Mohammad Alhashash
On 5/25/13, 12:53 AM

You need to escape % character as it is used for variable substitution. Use %% for each required character. Your string should be %%%%a - Abbreviated Week name.


Apparently, the question was not clearly writtten. As per the comment below, luis may want to to show dynamic week name in the view.

If you want to display dynamic data, you have 3 options:

  1. Include it as a functional field in the model.
  2. Dynamically modify the view by overriding fields_view_get().
  3. Write web client addon.

Thank you very much for your answer Mohammed, I try but it just return the literal text:

                 %%a - Abbreviated Week name
I put it this way:
 <label srtring="%%%%a - Abbreviated Week name" />

Am I doing something wrong?

on 5/27/13, 10:48 PM

Yes, You get a literal % character for each %%. That was how I understood you questions; How to display literal %? I update the answer in view of your comment.

Mohammad Alhashash
on 5/28/13, 3:48 AM

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: 5/24/13, 9:01 PM
Seen: 776 times
Last updated: 3/16/15, 8:10 AM