[fix] problem when switching from form view to list view in o2m

bzr revid: nicolas.vanhoren@openerp.com-20111026153944-bdk335em06dxxi2p
This commit is contained in:
niv-openerp 2011-10-26 17:39:44 +02:00
parent 5329b9273a
commit 33c4580c03
1 changed files with 5 additions and 2 deletions

View File

@ -2007,8 +2007,11 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
}
def.resolve();
});
this.viewmanager.on_mode_switch.add_first(function() {
self.save_form_view();
this.viewmanager.on_mode_switch.add_first(function(n_mode, b, c, d, e) {
$.when(self.save_form_view()).then(function() {
if(n_mode === "list")
setTimeout(function() {self.reload_current_view();}, 0);
});
});
this.is_setted.then(function() {
setTimeout(function () {