Odoo Help

0

% can't appear on view from xml

xml
By
luis
on 5/24/13, 9:01 PM 1,053 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.

0

Mohammad Alhashash

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

Developer

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.

Update:

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?

luis
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

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

Question tools

0 follower(s)

Stats

Asked: 5/24/13, 9:01 PM
Seen: 1053 times
Last updated: 3/16/15, 8:10 AM