AssertionError on buttons with states in model that inherits from other model
In 2.4, when having a <button type="object"...> with states (obviously in
model's _buttons dict, not in XML) in a model which inherits another model,
you'll get the traceback listed below in the client when opening its form view.
For example: when having a button in party.party model (with _buttons.states),
the client will crash when opening company.company form (company.company
inherits party.party).
Traceback (most recent call last):
File "/trytond/protocols/jsonrpc.py", line 123, in _marshaled_dispatch
response['result'] = dispatch_method(method, params)
File "/trytond/protocols/jsonrpc.py", line 156, in _dispatch
res = dispatch(*args)
File "/trytond/protocols/dispatcher.py", line 156, in dispatch
res = getattr(obj, method)(*args_without_context, **kargs)
File "/trytond/cache.py", line 98, in call
result = function(model, *args, **kwargs_origin)
File "/trytond/model/modelview.py", line 226, in fields_view_get
result['field_childs'])
File "/trytond/model/modelview.py", line 357, in _view_look_dom_arch
fields_width=fields_width)
File "/trytond/model/modelview.py", line 507, in __view_look_dom
fields_width=fields_width))
File "/trytond/model/modelview.py", line 507, in __view_look_dom
fields_width=fields_width))
File "/trytond/model/modelview.py", line 507, in __view_look_dom
fields_width=fields_width))
File "/trytond/model/modelview.py", line 474, in __view_look_dom
assert not element.get('states')
AssertionError