[fix] incorrect notifications in the o2m
bzr revid: nicolas.vanhoren@openerp.com-20110912140753-h3e7e153yp0fmxrw
This commit is contained in:
parent
d1be801b91
commit
70833c2c92
|
@ -384,9 +384,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||||
},
|
},
|
||||||
on_saved: function(r, success) {
|
on_saved: function(r, success) {
|
||||||
if (!r.result) {
|
if (!r.result) {
|
||||||
this.notification.warn(_t("Record not saved"), _t("Problem while saving record."));
|
// should not happen in the server, but may happen for internal purpose
|
||||||
} else {
|
} else {
|
||||||
console.debug(_.sprintf("The record #%s has been saved." + this.datarecord.id));
|
console.debug(_.sprintf("The record #%s has been saved.", this.datarecord.id));
|
||||||
if (success) {
|
if (success) {
|
||||||
success(r);
|
success(r);
|
||||||
}
|
}
|
||||||
|
@ -408,7 +408,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||||
*/
|
*/
|
||||||
on_created: function(r, success, prepend_on_create) {
|
on_created: function(r, success, prepend_on_create) {
|
||||||
if (!r.result) {
|
if (!r.result) {
|
||||||
this.notification.warn(_t("Record not created"), "Problem while creating record.");
|
// should not happen in the server, but may happen for internal purpose
|
||||||
} else {
|
} else {
|
||||||
this.datarecord.id = r.result;
|
this.datarecord.id = r.result;
|
||||||
if (!prepend_on_create) {
|
if (!prepend_on_create) {
|
||||||
|
|
Loading…
Reference in New Issue