I am new to openERP. I am working on changing the color in tree view for those record whose due_date is less then Today. Those record should be in red color.
I am not able to get the current date as filter in tree view.
xml what I need but not working:
<tree colors="blue:Due_date < Today()" string="Invoice">
<field name="Due_date" />
<field name="date_invoice"/>
<field name="state"/>
</tree>
Working code
<tree colors="blue:state == 'open'" string="Invoice">
<field name="partner_id" groups="base.group_user"/>
<field name="date_invoice"/>
<field name="state"/>
</tree>
I tried with
context_today()
and
datetime.datetime.now()
Nothing work.
Please help me on this.
This will work, try this:
In .xml side
<, >, <=, >=
is not supported. So we need to use<, >, <= and >=
This will work, try this,