Priority, kanban state, and color

Other than stages, a few more fields are useful and frequently used in kanban boards:

  • priority lets users organize their work items, signaling what should be addressed first.
  • kanban_state signals whether a task is ready to move to the next stage or is blocked for some reason. At the model definition layer, both are selection fields. At the view layer, they have specific widgets for them that can be used on form and Kanban views.
  • color is used to store the color the Kanban card should display, and can be set using a color picker menu available on Kanban views.

To add these fields to our model, we should edit the  models/todo_task_model.py file:

# class TodoTask(models.Model):#   ... color = fields.Integer('Color ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.