[FIX] Editor is not restartable, so don't restart it.
Instead, create a new one at each on_loaded. Editor is not restartable because the formview wedges itself if its on_loaded is called more than once bzr revid: xmo@openerp.com-20120709080604-er1l6bn5eespue59
This commit is contained in:
parent
ee20d56357
commit
cd59881b05
|
@ -78,10 +78,16 @@ openerp.web.list_editable = function (instance) {
|
|||
},
|
||||
on_loaded: function (data, grouped) {
|
||||
var self = this;
|
||||
if (this.editor) {
|
||||
this.editor.destroy();
|
||||
}
|
||||
// tree/@editable takes priority on everything else if present.
|
||||
this.options.editable = ! this.options.read_only && (data.arch.attrs.editable || this.options.editable);
|
||||
var result = this._super(data, grouped);
|
||||
if (this.options.editable) {
|
||||
// Editor is not restartable due to formview not being
|
||||
// restartable
|
||||
this.editor = new instance.web.list.Editor(this);
|
||||
var editor_ready = this.editor.prependTo(this.$element)
|
||||
.then(this.proxy('setupEvents'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue