[IMP] web_kanban: make kanban records non-draggable when user cannot edit them

bzr revid: rco@openerp.com-20120905090544-ru224cad11jyxwbv
This commit is contained in:
Raphael Collet 2012-09-05 11:05:44 +02:00
parent ef1dba8934
commit 8c9777d4ce
1 changed files with 3 additions and 2 deletions

View File

@ -726,9 +726,10 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
trigger: 'hover'
});
// If no draghandle is found, make the whole card as draghandle
// If no draghandle is found, make the whole card as draghandle (provided one can edit)
if (!this.$el.find('.oe_kanban_draghandle').length) {
this.$el.children(':first').addClass('oe_kanban_draghandle');
this.$el.children(':first')
.toggleClass('oe_kanban_draghandle', this.view.is_action_enabled('edit'));
}
this.$el.find('.oe_kanban_action').click(function() {