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. 2
      web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

2
web_access_rule_buttons/static/src/js/web_access_rule_buttons.js

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

Loading…
Cancel
Save