[MERGE] [FIX] reload form if button has option reload_on_button

bzr revid: mat@openerp.com-20130821085342-8k6q1d2886tmwffm
This commit is contained in:
Martin Trigaux 2013-08-21 10:53:42 +02:00
commit cd99b9ffac
1 changed files with 7 additions and 1 deletions

View File

@ -3937,7 +3937,13 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
else
return $.when();
}).done(function () {
self.handle_button(name, id, callback);
if (!self.o2m.options.reload_on_button) {
self.handle_button(name, id, callback);
}else {
self.handle_button(name, id, function(){
self.o2m.view.reload();
});
}
});
},