[FIX] in One2ManyListView, use method _is_action_enabled() instead of specific code
bzr revid: rco@openerp.com-20120903070725-qpwseju4ryuh9bc2
This commit is contained in:
parent
3e5c6a4d95
commit
01887ce1f3
|
@ -3470,7 +3470,6 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
|||
},
|
||||
do_activate_record: function(index, id) {
|
||||
var self = this;
|
||||
var attr_readonly = (_.has(this.fields_view.arch.attrs, 'edit')) ? JSON.parse(this.fields_view.arch.attrs.edit) : true;
|
||||
var pop = new instance.web.form.FormOpenPopup(self.o2m.view);
|
||||
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
|
||||
title: _t("Open: ") + self.o2m.string,
|
||||
|
@ -3486,7 +3485,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
|||
return self.o2m.dataset.read_ids.apply(self.o2m.dataset, arguments);
|
||||
},
|
||||
form_view_options: {'not_interactible_on_create':true},
|
||||
readonly: attr_readonly ? self.o2m.get("effective_readonly") : true,
|
||||
readonly: !this._is_action_enabled('edit') || self.o2m.get("effective_readonly")
|
||||
});
|
||||
},
|
||||
do_button_action: function (name, id, callback) {
|
||||
|
|
Loading…
Reference in New Issue