diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index cca3d410a50..669126820e8 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -148,12 +148,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (this.fields_view.toolbar) {
this.sidebar.add_toolbar(this.fields_view.toolbar);
}
- if (self._is_action_enabled('delete')) {
+ if (self.is_action_enabled('delete')) {
this.sidebar.add_items('other', [
{ label: _t('Delete'), callback: self.on_button_delete }
]);
}
- if (self._is_action_enabled('create')) {
+ if (self.is_action_enabled('create')) {
this.sidebar.add_items('other', [
{ label: _t('Duplicate'), callback: self.on_button_duplicate }
]);
@@ -3485,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: !this._is_action_enabled('edit') || self.o2m.get("effective_readonly")
+ readonly: !this.is_action_enabled('edit') || self.o2m.get("effective_readonly")
});
},
do_button_action: function (name, id, callback) {
@@ -3573,7 +3573,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
});
instance.web.form.One2ManyList = instance.web.ListView.List.extend({
pad_table_to: function (count) {
- this._super(this.view._is_action_enabled('create') ? (count > 0 ? count - 1 : 0) : this.records.length);
+ this._super(this.view.is_action_enabled('create') ? (count > 0 ? count - 1 : 0) : this.records.length);
// magical invocation of wtf does that do
if (this.view.o2m.get('effective_readonly')) {
@@ -3586,7 +3586,7 @@ instance.web.form.One2ManyList = instance.web.ListView.List.extend({
}).length;
if (this.options.selectable) { columns++; }
if (this.options.deletable) { columns++; }
- if (this.view._is_action_enabled('create')) {
+ if (this.view.is_action_enabled('create')) {
var $cell = $('
', {
colspan: columns,
'class': 'oe_form_field_one2many_list_row_add'
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 06d2548339c..da806f415cf 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -252,13 +252,13 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.$el.addClass(this.fields_view.arch.attrs['class']);
// add css classes that reflect the (absence of) access rights
- if (!this._is_action_enabled('create')) {
+ if (!this.is_action_enabled('create')) {
this.$el.addClass('oe_list_cannot_create');
}
- if (!this._is_action_enabled('edit')) {
+ if (!this.is_action_enabled('edit')) {
this.$el.addClass('oe_list_cannot_edit');
}
- if (!this._is_action_enabled('delete')) {
+ if (!this.is_action_enabled('delete')) {
this.$el.addClass('oe_list_cannot_delete');
}
@@ -363,7 +363,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
if (!this.sidebar && this.options.$sidebar) {
this.sidebar = new instance.web.Sidebar(this);
this.sidebar.appendTo(this.options.$sidebar);
- if (self._is_action_enabled('create')) {
+ if (self.is_action_enabled('create')) {
this.sidebar.add_items('other', [
{ label: _t("Import"), callback: this.on_sidebar_import }
]);
@@ -371,7 +371,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.sidebar.add_items('other', [
{ label: _t("Export"), callback: this.on_sidebar_export }
]);
- if (self._is_action_enabled('delete')) {
+ if (self.is_action_enabled('delete')) {
this.sidebar.add_items('other', [
{ label: _t('Delete'), callback: this.do_delete_selected }
]);
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index 2615d8c66dd..5a1eac23a90 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -750,7 +750,7 @@ openerp.web.list_editable = function (instance) {
instance.web.ListView.List.include(/** @lends instance.web.ListView.List# */{
row_clicked: function (event) {
- if (!this.view.editable() || ! this.view._is_action_enabled('edit')) {
+ if (!this.view.editable() || ! this.view.is_action_enabled('edit')) {
return this._super.apply(this, arguments);
}
var record_id = $(event.currentTarget).data('id');
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 183b63a218e..43d935b91e8 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1363,7 +1363,7 @@ instance.web.View = instance.web.Widget.extend({
* An action is disabled by setting the corresponding attribute in the view's main element,
* like: |