Fill ModelView.__change_buttons in __post_setup__
Since the refactoring from a57cd35eec06, we loop only on fields in __setup__ so button_change are not processed. And __change_buttons is not filled. We fill it in the __post_setup__ when the _buttons dict is filled when values. issue8329
This commit is contained in:
@@ -215,6 +215,13 @@ class ModelView(Model):
|
||||
cls.__rpc__.setdefault(button,
|
||||
RPC(instantiate=0, result=on_change_result))
|
||||
|
||||
for parent_cls in cls.__mro__:
|
||||
parent_meth = getattr(parent_cls, button, None)
|
||||
if not parent_meth:
|
||||
continue
|
||||
cls.__change_buttons[button] |= getattr(
|
||||
parent_meth, 'change', set())
|
||||
|
||||
@classmethod
|
||||
def fields_view_get(cls, view_id=None, view_type='form'):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user