Setting button state fails without record
Since 0e988bac37ba the button are also disabled if the record is readonly. But `set_state` can be called without `record`.
issue