Merge pull request #360 from odoo-dev/master-sortable-kanban-sequence-chm
[IMP] website: Kanban is sortable for one column if the field sequence is available inside the kanban view (or one2many kanban view).
This commit is contained in:
commit
36a2615965
|
@ -348,10 +348,14 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
},
|
||||
on_groups_started: function() {
|
||||
var self = this;
|
||||
if (this.group_by) {
|
||||
if (this.group_by || this.fields_keys.indexOf("sequence") !== -1) {
|
||||
// Kanban cards drag'n'drop
|
||||
var prev_widget, is_folded, record;
|
||||
var $columns = this.$el.find('.oe_kanban_column .oe_kanban_column_cards, .oe_kanban_column .oe_kanban_folded_column_cards');
|
||||
var prev_widget, is_folded, record, $columns;
|
||||
if (this.group_by) {
|
||||
$columns = this.$el.find('.oe_kanban_column .oe_kanban_column_cards, .oe_kanban_column .oe_kanban_folded_column_cards');
|
||||
} else {
|
||||
$columns = this.$el.find('.oe_kanban_column_cards');
|
||||
}
|
||||
$columns.sortable({
|
||||
handle : '.oe_kanban_draghandle',
|
||||
start: function(event, ui) {
|
||||
|
|
Loading…
Reference in New Issue