Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2738 Переглядів

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

Аватар
Відмінити