在树视图 odoo 9 中更改颜色

Change color in tree view odoo 9

是否可以在树视图中更改颜色,例如,如果字段 total_time(浮动时间小部件)<= 00:00 为红色。

我正在尝试下面的例子,但没有用!

colors="red:total_time<='00:00'"

您可以使用以下方法完成。

colors="red:total_time&lt;='00:00'"

您必须转义 XML 中的特殊字符。

例如:

less than (<) is escaped to &lt;

greater than (>) is escaped to &gt;

这可能对你有帮助。