Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2723 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona