[FIX] problem with m2m and default values

lp bug: https://launchpad.net/bugs/997019 fixed

bzr revid: nicolas.vanhoren@openerp.com-20120607141930-f9q4gg88d0fe9yyq
This commit is contained in:
niv-openerp 2012-06-07 16:19:30 +02:00
parent 45fc9bba23
commit d1018bb031
1 changed files with 4 additions and 1 deletions

View File

@ -3287,6 +3287,9 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({
self.reload_content();
this.is_setted.resolve();
},
get_value: function() {
return [commands.replace_with(this.get('value'))];
},
load_view: function() {
var self = this;
this.list_view = new instance.web.form.Many2ManyListView(this, this.dataset, false, {
@ -3316,7 +3319,7 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({
});
},
dataset_changed: function() {
this.set({'value': [commands.replace_with(this.dataset.ids)]});
this.set({'value': this.dataset.ids});
},
});