summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_form.js
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2012-09-04 16:11:55 +0200
committerRaphael Collet <rco@openerp.com>2012-09-04 16:11:55 +0200
commit14e87c09f3ecf5cefd9b6d6bcfc6b5efa35e7729 (patch)
treeabe9729d6cdd95f6f6424d3ec30a7775756d4e60 /addons/web/static/src/js/view_form.js
parent440b8aabbd9ca0e1928d39207c6ed957fec613c8 (diff)
[IMP] rename method _is_action_enabled to is_action_enabled
bzr revid: rco@openerp.com-20120904141155-288vwhonbt07dfcs
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
-rw-r--r--addons/web/static/src/js/view_form.js10
1 files changed, 5 insertions, 5 deletions
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 = $('<td>', {
colspan: columns,
'class': 'oe_form_field_one2many_list_row_add'