Odoo decorations in tree view not working?

860 Views Asked by At

I am trying to add decorations in an inherited tree view in odoo 13. For this I added a variable in my module

x_LCStatus = fields.Selection(selection=[('0', 'In development'),('1', 'Active'), 
   ('2', 'Not for new developments'), ('3', 'End of life')], string='Life cycle', 
   default='1', store=True)

However, when I try to change the decoration in the associated tree view nothing changes from the default settings.

<xpath expr="//tree" position="attributes">
      <attribute name="decoration-danger">"x_LCStatus=='3'"</attribute>
      <attribute name="decoration-warning">"x_LCStatus=='2'"</attribute>
      <attribute name="decoration-primary">"x_LCStatus=='1'"</attribute>
</xpath>

Any ideas what I am doing wrong?

0

There are 0 best solutions below