[fix] When we click a button in a m2o popup it closes the popup

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

bzr revid: nicolas.vanhoren@openerp.com-20111013115828-ctbslk34qif4cfwt
This commit is contained in:
niv-openerp 2011-10-13 13:58:28 +02:00
parent 4dc731f99c
commit 1e507afcc9
1 changed files with 3 additions and 2 deletions

View File

@ -2483,7 +2483,6 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
this.setup_form_view();
},
on_write: function(id, data) {
this.stop();
if (!this.options.auto_write)
return;
var self = this;
@ -2506,7 +2505,9 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
$buttons.html(QWeb.render("FormOpenPopup.form.buttons"));
var $nbutton = $buttons.find(".oe_formopenpopup-form-save");
$nbutton.click(function() {
self.view_form.do_save();
self.view_form.do_save().then(function() {
self.stop();
});
});
var $cbutton = $buttons.find(".oe_formopenpopup-form-close");
$cbutton.click(function() {