当字段的结束日期小于当前日期时,如何将字段值更改为红色?

2024-05-16 13:09:39 发布

您现在位置:Python中文网/ 问答频道 /正文

当结束日期小于字段上的当前日期时,我想将字段值更改为红色?我有字段名followup_date,如果followup date已过,则应在网格上标记为红色。这个方法会创建上一个日期小于当前日期,但我不知道如何编写这个方法?这怎么可能?有人能帮我吗?提前谢谢。。。在


Tags: 方法标记网格date字段名段值红色followup
2条回答

我用这个解决了我的问题,它现在对我有用。在

<tree string="Claims" position="attributes">
  <attribute name="colors">red:followup_date &lt; current_date;</attribute>
</tree>

<field name="stage_id" position="after">
  <field name="followup_date" invisible="1"/>
  <field name="current_date" invisible="1"/>
</field>

如果你所说的网格是指一张12平方毫米的桌子。这里有一个可以帮助你的例子。在

<tree colors="red:followup_date < current_date">
    <field name="followup_date"/>        
</tree>

相关问题 更多 >