mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Check if buttons are set in case we are in a popup window
This commit is contained in:
committed by
Guewen Baconnier
parent
fe1848db2d
commit
0c1df28982
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user