[fix] problem with view form and create
bzr revid: nicolas.vanhoren@openerp.com-20120410101833-d04e7srycumgny4z
This commit is contained in:
parent
6ac3ace21b
commit
3ecbccb0d1
|
@ -473,6 +473,7 @@ openerp.web.FormView = openerp.web.View.extend({
|
|||
},
|
||||
on_button_new: function() {
|
||||
var self = this;
|
||||
this.set({mode: "edit"});
|
||||
var def = $.Deferred();
|
||||
$.when(this.has_been_loaded).then(function() {
|
||||
if (self.can_be_discarded()) {
|
||||
|
@ -495,7 +496,6 @@ openerp.web.FormView = openerp.web.View.extend({
|
|||
},
|
||||
on_button_create: function() {
|
||||
this.dataset.index = null;
|
||||
this.set({mode: "edit"});
|
||||
this.do_show();
|
||||
},
|
||||
on_button_duplicate: function() {
|
||||
|
|
Loading…
Reference in New Issue