Odoo Help


[SOLVED]Color just a part of a field in an RML report

on 2/2/15, 12:05 PM 1,032 views

Hi everyone,


I would like to know if it is possible to color just a part of a field in an RML report.

I have a "big" field that contrain a long text. I would like to just color a part of the field (Titlle of some part of my text).

I try some html command like <p> for bold inside the field but it doesn't works. RML considere it like text and not like command.

If someone has an idea, it can help me a lot!

Thank you,


Aurélien Briand

Or maybe it is impossible? It mean that I need to create multiple field?

on 2/4/15, 6:25 AM

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--

| 6 5 6
Baroda, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 2/4/15, 6:45 AM

Hello Selverine,

use this code for color format in rml report

<para textColor="red">
            this paragraph has red color.

also try this code

<para textColor="blue">
      This paragraph has been styled, but not using the stylesheet.
      It just uses style attributes inside it's own &lt;para&gt; tag.


if you find this answer helpful, please give me a thumbs up vote    


Ankit H Gandhi

Hi Ankit, Thank you for your answer. However , I have the impression that with this I will have a color for all the field. However I want just a part of the field ( It is a long test and I want to put a color just on the title and some worlds). If I put this inside my field, it will work? Thank you, Selverine

on 2/4/15, 7:58 AM

@ Selverine: you can put your field inside the para tag itself. so it will affect only on that field.

Ankit H Gandhi(AHG)
on 2/4/15, 8:22 AM

@Ankit. My field is a long text. I want just the beginning of my field in a red color. But the last part of the field I want it black. With this I will have or all my field red or all black no?

on 2/4/15, 9:05 AM

Maybe I was not clear but my field is a field that I get from database. It is not a text in rml file

on 2/4/15, 9:10 AM

If you can determine how long the TITLE is, or if it is delimited somehow, you can break the field into 2 parts (string operation in python) and the put the first part in the coloured para and the next part in the black para.

on 2/4/15, 10:17 AM

Hum not bad idea. I don't know how long but I can maybe find a specific word. I suppose it is possible too with Python. Thank you for the tips!

on 2/4/15, 10:44 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.


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

2 follower(s)


Asked: 2/2/15, 12:05 PM
Seen: 1032 times
Last updated: 3/16/15, 8:10 AM