Reputation: 237
I want to change the field value as red color when end date is less than current date on field ? I have field name followup_date, If Follow up Date has passed then it should be marked as Red on Grid. The method will create previous date is less than current date, but i have no idea how to write this method? How is this possible? Can anyone help me out? Thanks in Advance...
Upvotes: 0
Views: 800
Reputation: 237
I resolved my problem by this, its working for me now.
<tree string="Claims" position="attributes">
<attribute name="colors">red:followup_date < current_date;</attribute>
</tree>
<field name="stage_id" position="after">
<field name="followup_date" invisible="1"/>
<field name="current_date" invisible="1"/>
</field>
Upvotes: 1
Reputation: 3378
If by grid you mean a One2many table. Here is an example that may help you.
<tree colors="red:followup_date < current_date">
<field name="followup_date"/>
</tree>
Upvotes: 1