Odoo Help


Adding Kanban State to Form View?

Nick K
on 7/16/13, 4:56 PM 3,939 views

Is there a way to add the Kanban State of a project task to the task's form view, and make it editable? I tried adding the kanban_state field in the view editor, and it shows the state, but it is marked as read-only. Also, is there a way to change the text associated with each state?

Devvyn Murphy
On 3/18/14, 9:44 PM

(There is no quick fix for this, but hopefully this answer helps in the learning process, at least.)

Quick and dirty override

I cannot confidently guarantee there would be no potential side effects, but a view field override to the model's read-only attribute would allow users to change the value while in the form view.

Rather than:

<field name="kanban_state"/>


<field name="kanban_state" readonly="0"/>


<field name="kanban_state" attrs="{'readonly':0}"/>

In OpenERP 7.0, either of those two lines produced a writeable field in my form view which overrode the object model's read-only setting. In edit mode, I was able to choose values from the option box and save them to the database.


This override probably skips the notifications from being sent to subscribers of the "Task Blocked" events, and the others. A proper solution should cause the selection input to call the same methods the kanban_state button on the kanban view usually call.

Selectable option names

The strings of the kanban_state options are unfortunately hard-coded and marked as non-translatable, so you'd need to create an add-on that would override the _columns dictionary in project_task and project_task_history objects. This is not very straight-forward to explain here, but I believe an add-on to do so would only need as little as three files. See the developer documentation at doc.openerp.com/trunk/server/03_module_dev_02/#object-inheritance-inherit for more about object inheritance. Alternatively, you could duplicate the entire folder for the standard Project add-on and apply your tweaks, installing it instead of the usual add-on for tasks. The lines you'd need to modify look like:

'kanban_state': fields.selection([('normal', 'Normal'), ('blocked', 'Blocked'), ('done', 'Ready for next stage')], 'Kanban State', required=False),

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 7/16/13, 4:56 PM
Seen: 3939 times
Last updated: 3/16/15, 8:10 AM