Browse Source

Check if button is defined and use .prop()

pull/1243/head
Guewen Baconnier 9 years ago
committed by antonio
parent
commit
f44ddacb88
  1. 6
      web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

6
web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

@ -33,10 +33,8 @@ odoo.define('web_access_rule_buttons.main', function (require) {
show_hide_edit_button: function(access) {
if (this.$buttons) {
var button = this.$buttons.find('.oe_form_button_edit');
if(access) {
button.removeAttr('disabled');
} else {
button.attr('disabled', true);
if(button) {
button.prop('disabled', !access);
}
}
}

Loading…
Cancel
Save