Browse Source

Check if buttons are set in case we are in a popup window

pull/284/head
Yannick Vaucher 9 years ago
committed by Guewen Baconnier
parent
commit
0c1df28982
  1. 12
      web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

12
web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

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

Loading…
Cancel
Save