0

我正在尝试在 odoo 13 的继承树视图中添加装饰。为此,我在模块中添加了一个变量

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)

但是,当我尝试更改关联树视图中的装饰时,默认设置没有任何变化。

<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>

任何想法我做错了什么?

4

0 回答 0