コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2743 ビュー

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

アバター
破棄