Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2722 Weergaven

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

Avatar
Annuleer
Auteur Beste antwoord

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

Avatar
Annuleer