I am creating a custom module and want the cards in kanban view to change based on their age. I currently have the field:
checkin_date = fields.Date(default=fields.Date.today)
This is set whenever the form is filled out initially. In kanban I want to change the color based on how long ago checkin_date occurred.
Example: If current date - checkin_date < 3 days, kanban cards stay the same color. If 3=5, the cards are yellow. >5 is red. This way we can immediately see the age of the items we need to deal with first.
EDIT: How do I calculate the age of the item based on the checkin_date?
Odoo V11 Community