[FIX] web_kanban: quick redrag of kanban records

When dropping a record, it is updated and rerendered. The problem with
this behaviour is that if the record is redrag immediately after drop,
jquery-ui throws an error as the widget the user is trying to re-move
is being rerendered.

The solution provided by this commit is to block the draggable feature
while the record is being rerendered.
This commit is contained in:
qsm-odoo
2016-05-13 16:03:04 +02:00
parent aee53a3695
commit 068acf76da
@@ -91,7 +91,7 @@ var KanbanColumn = Widget.extend({
connectWith: '.o_kanban_group',
revert: 0,
delay: 0,
items: '> .o_kanban_record',
items: '> .o_kanban_record:not(.o_updating)',
helper: 'clone',
cursor: 'move',
over: function () {
@@ -117,6 +117,7 @@ var KanbanColumn = Widget.extend({
// adding record to this column
self.records.push(record);
record.setParent(self);
ui.item.addClass('o_updating');
self.trigger_up('kanban_column_add_record', {record: record});
}
self.update_column();