[IMP] correctly use underscore, remove 4 useless lines

bzr revid: xmo@openerp.com-20110708113704-lulvihowvrd7zhkg
This commit is contained in:
Xavier Morel 2011-07-08 13:37:04 +02:00
parent fcf339df2c
commit fe88c437fe
1 changed files with 2 additions and 6 deletions

View File

@ -1116,12 +1116,8 @@ openerp.base.form.FieldSelection = openerp.base.form.Field.extend({
init: function(view, node) {
this._super(view, node);
this.template = "FieldSelection";
this.field_index = [];
var self = this;
var i = 0;
_.each(this.field.selection, function(x) {
self.field_index.push({"ikey": "" + i, "ekey": x[0], "label": x[1]});
i = i + 1;
this.field_index = _.map(this.field.selection, function(x, index) {
return {"ikey": "" + index, "ekey": x[0], "label": x[1]};
});
},
start: function() {