[FIX] web : drag and drop for kanban does not open record
Steps to reproduce: -Install Project -Activate kanban view for projects in the settings -On firefix do a drag and drop of a project between two stages Current behavior: You are redirect to the project record Expected behavior: The project changed stage but there is no redirection Solution: The check for the drag&drop case only happen inside the openRecord function but the record should not be open in this situation and hence the check should happen before the function is called in onGlobalClick. opw-2952389 closes odoo/odoo#99120 X-original-commit: 977ef91693f22a5fab2b71d4dadf99046853ca9d Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
This commit is contained in:
@@ -240,11 +240,6 @@ var KanbanRecord = Widget.extend(WidgetAdapterMixin, {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.$el.hasClass('o_currently_dragged')) {
|
||||
// this record is currently being dragged and dropped, so we do not
|
||||
// want to open it.
|
||||
return;
|
||||
}
|
||||
var editMode = this.$el.hasClass('oe_kanban_global_click_edit');
|
||||
this.trigger_up('open_record', {
|
||||
id: this.db_id,
|
||||
@@ -695,6 +690,11 @@ var KanbanRecord = Widget.extend(WidgetAdapterMixin, {
|
||||
if ($(event.target).parents('.o_dropdown_kanban').length) {
|
||||
return;
|
||||
}
|
||||
if (this.$el.hasClass('o_currently_dragged')) {
|
||||
// this record is currently being dragged and dropped, so we do not
|
||||
// want to open it.
|
||||
return;
|
||||
}
|
||||
var trigger = true;
|
||||
var elem = event.target;
|
||||
var ischild = true;
|
||||
|
||||
Reference in New Issue
Block a user