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:
Cédric Krier
2019-05-06 11:34:11 +02:00
parent 1f4015ae60
commit da5b0daf68
+7
View File
@@ -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'):
'''