[FIX] quick create: do not add the id in the form if the form is readonly (eg: clicking on save button will make the form uneditable)
bzr revid: mat@openerp.com-20140307141257-rvusvzm6oq3tel51
This commit is contained in:
parent
cb3791d83d
commit
618c8b9100
|
@ -2977,6 +2977,7 @@ instance.web.form.CompletionFieldMixin = {
|
|||
if (self.options.quick_create === undefined || self.options.quick_create) {
|
||||
new instance.web.DataSet(this, this.field.relation, self.build_context())
|
||||
.name_create(name).done(function(data) {
|
||||
if (!self.get('effective_readonly'))
|
||||
self.add_id(data[0]);
|
||||
}).fail(function(error, event) {
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in New Issue