Search code examples
pythonxmlodoo-8kanban

how to detect the drag and drop event of kanban view in odoo?


Kanban view and kanban cards

If i drag and drop a Kanban card from one column to another column (Anylysis to On progress) how can i detect that a card is moved ?


Solution

  • On every drag and drop event set_record() will be called

    set_record: function(record) {
        var self = this;
        this.id = record.id;
        this.values = {};
        _.each(record, function(v, k) {
            self.values[k] = {
                value: v
            };
        });
        this.record = this.transform_record(record);
    },
    

    src: https://github.com/odoo/odoo/blob/8.0/addons/web_kanban/static/src/js/kanban.js#L894