Search code examples
odooodoo-8qweb

How to display label of a field in qweb reports?


Is there a way to display the label we put on a field in a qweb reports?

For example

In my .py

findings = fields.Text(string="Findings")

And in my .xml

<t t-esc="findings" /> <!-- only shows the value -->

Can we also get the label in qweb?


Solution

  • You can not get the label of the field. Instead you can add html tag to show the label

    Ex:

    <p>Your Label <t t-esc="findings" /> </p>
    
     or
    <span> Some Text <t t-esc="findings" /> </span>