forked from Techsystech/web
Check if button is defined and use .prop()
parent
836a642c42
commit
f44ddacb88
|
@ -33,10 +33,8 @@ odoo.define('web_access_rule_buttons.main', function (require) {
|
||||||
show_hide_edit_button: function(access) {
|
show_hide_edit_button: function(access) {
|
||||||
if (this.$buttons) {
|
if (this.$buttons) {
|
||||||
var button = this.$buttons.find('.oe_form_button_edit');
|
var button = this.$buttons.find('.oe_form_button_edit');
|
||||||
if(access) {
|
if(button) {
|
||||||
button.removeAttr('disabled');
|
button.prop('disabled', !access);
|
||||||
} else {
|
|
||||||
button.attr('disabled', true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue