[IMP] kanban: delete one method for widget=many2many_tag

bzr revid: chm@openerp.com-20120914081846-oi9h8mnmmefl9p3y
This commit is contained in:
Christophe Matthieu 2012-09-14 10:18:46 +02:00
parent 9b44f9b709
commit 7e673e2999
2 changed files with 1 additions and 43 deletions

View File

@ -4773,6 +4773,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
}
this.render_elements();
}
console.log('end selection');
},
/** Renders the widget. This function also checks for statusbar_colors='{"pending": "blue"}'
* attribute in the widget. This allows to set a given color to a given

View File

@ -198,48 +198,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
}
}
},
transform_list_many2many: function(){
var self = this;
var arg={};
/* Set the lists of tag/categories */
var blocks = self.$el.find('.oe_kanban_list_many2many');
for(var i=0;i<blocks.length;i++){
var block = $(blocks[i]);
//select the model
var model = block.data('model');
if(model&&model.length>1){
if(!arg[model]) arg[model]=[];
// select all ids
block.find('[data-list_id]').each(function() {
arg[model].push( $(this).data('list_id') );
});
}
}
// only one request by model
for(var model in arg){
if(arg[model].length>0){
var dataset = new instance.web.DataSetSearch(self, model, self.session.context);
dataset.name_get(_.uniq( arg[model] )).then(
function(result) {
for(var t=0;t<result.length;t++){
self.$el.find(".oe_kanban_list_many2many[data-model='" + model + "'] [data-list_id='" + result[t][0] + "']")
.html(result[t][1]);
}
},
function(r){
console.log('Error',r);
}
);
}
}
},
do_add_record: function() {
this.dataset.index = null;
this.do_switch_view('form');
@ -428,7 +386,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
this.$el.find('.oe_kanban_draghandle').removeClass('oe_kanban_draghandle');
}
this.transform_list_many2many();
this.transform_widget_many2many();
},
on_record_moved : function(record, old_group, old_index, new_group, new_index) {