[FIX] Always save record even when form is not dirty and/or has no field to save. (osv.memory)

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

bzr revid: fme@openerp.com-20110919103427-j8pqfxs4iw54oi56
This commit is contained in:
Fabien Meghazi 2011-09-19 12:34:27 +02:00
parent 2b04278508
commit bb49028b5c
1 changed files with 1 additions and 6 deletions

View File

@ -368,7 +368,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
first_invalid_field.focus();
this.on_invalid();
return false;
} else if (form_dirty) {
} else {
console.log("About to save", values);
if (!this.datarecord.id) {
return this.dataset.create(values, function(r) {
@ -379,11 +379,6 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
self.on_saved(r, success);
});
}
} else {
setTimeout(function() {
self.on_saved({ result: true }, success);
});
return true;
}
},
do_save_edit: function() {