[FIX]Add option 'disable_editable_mode' which disable editable widget when setted to true. This is because search popups should not be editable. 'search more...' was not clickable in fields with many2many_tags widget and default tree view with flag editable setted
lp bug: https://launchpad.net/bugs/1080997 fixed bzr revid: dle@openerp.com-20121120153958-jopkpxmz38b78phj
This commit is contained in:
parent
ade1a5df87
commit
08e0522ad6
|
@ -4628,6 +4628,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
|
||||||
'selectable': !self.options.disable_multiple_selection,
|
'selectable': !self.options.disable_multiple_selection,
|
||||||
'import_enabled': false,
|
'import_enabled': false,
|
||||||
'$buttons': self.$buttonpane,
|
'$buttons': self.$buttonpane,
|
||||||
|
'disable_editable_mode': true,
|
||||||
}, self.options.list_view_options || {}));
|
}, self.options.list_view_options || {}));
|
||||||
self.view_list.on('edit:before', self, function (e) {
|
self.view_list.on('edit:before', self, function (e) {
|
||||||
e.cancel = true;
|
e.cancel = true;
|
||||||
|
|
|
@ -21,6 +21,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
||||||
// whether the view rows can be reordered (via vertical drag & drop)
|
// whether the view rows can be reordered (via vertical drag & drop)
|
||||||
'reorderable': true,
|
'reorderable': true,
|
||||||
'action_buttons': true,
|
'action_buttons': true,
|
||||||
|
//whether the editable property of the view has to be disabled
|
||||||
|
'disable_editable_mode': false,
|
||||||
},
|
},
|
||||||
view_type: 'tree',
|
view_type: 'tree',
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -88,9 +88,10 @@ openerp.web.list_editable = function (instance) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editable: function () {
|
editable: function () {
|
||||||
return this.fields_view.arch.attrs.editable
|
return !this.options.disable_editable_mode
|
||||||
|
&& (this.fields_view.arch.attrs.editable
|
||||||
|| this._context_editable
|
|| this._context_editable
|
||||||
|| this.options.editable;
|
|| this.options.editable);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Replace do_search to handle editability process
|
* Replace do_search to handle editability process
|
||||||
|
|
Loading…
Reference in New Issue