Tryton - Issues



Title AssertionError on buttons with states in model that inherits from other model
Priority bug Status resolved
Superseder Nosy List ced, roba, vincent
Type Components trytond
Assigned To ced Keywords

Created on 2012-06-08.10:08:34 by vincent, last changed by ced.

msg12779 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-03-21.19:10:32
Fixed in rev 94629ee54c66
There is no more any reason to inherits a view from an other Model.
msg12539 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-02-18.01:31:52
It will be fixed with the remove of inherit in review670002
msg10974 (view) Author: [hidden] (vincent) Date: 2012-06-08.11:07:15
Small update: removing the _button.update(..) lines from model 
completely is apparently not enough. A print statement proved that states was 
empty (states={}), but because it still existed, the AssertionError was still 

Only removing the <button ...> completely from XML or removing the assert fixes 
the error.
msg10973 (view) Author: [hidden] (vincent) Date: 2012-06-08.10:08:33
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 model (with _buttons.states), 
the client will crash when opening form ( 

Traceback (most recent call last):
  File "/trytond/protocols/", line 123, in _marshaled_dispatch
    response['result'] = dispatch_method(method, params)
  File "/trytond/protocols/", line 156, in _dispatch
    res = dispatch(*args)
  File "/trytond/protocols/", line 156, in dispatch
    res = getattr(obj, method)(*args_without_context, **kargs)
  File "/trytond/", line 98, in call
    result = function(model, *args, **kwargs_origin)
  File "/trytond/model/", line 226, in fields_view_get
  File "/trytond/model/", line 357, in _view_look_dom_arch
  File "/trytond/model/", line 507, in __view_look_dom
  File "/trytond/model/", line 507, in __view_look_dom
  File "/trytond/model/", line 507, in __view_look_dom
  File "/trytond/model/", line 474, in __view_look_dom
    assert not element.get('states')
Date User Action Args
2013-03-21 19:10:43cedsetstatus: in-progress -> resolved
messages: + msg12779
2013-02-18 01:31:52cedsetstatus: chatting -> in-progress
assignedto: ced
component: + trytond
messages: + msg12539
nosy: + ced
2012-12-10 10:06:31robasetnosy: + roba
2012-06-12 23:26:22cedlinkissue2651 superseder
2012-06-08 11:07:16vincentsetstatus: unread -> chatting
messages: + msg10974
2012-06-08 10:08:34vincentcreate

Showing 10 items. Show all history (warning: this could be VERY long)