跳至内容
菜单
此问题已终结
1 回复
2721 查看

Hello
How can I color a date field in a form view depending on the current date?

for instance red if < today and black otherwise

Thanks in advance,


Bruno

形象
丢弃
编写者 最佳答案

I have found this solution which seems to work:

<field name="date_entry" attrs="{'invisible': [('parent_id', '=', False)]}" decoration-danger="date_entry &lt; current_date"/>

形象
丢弃