Comment 3 for bug 416016

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 416016] [NEW] error on displaying functional fields

Right, you don't need readonly=True in functional fields, it's implied.

A Dimecres, 19 d'agost de 2009, Ferdinand @ ChriCar va escriure:
> Public bug reported:
>
> 'current_artist' : fields.function(_current_artist,
> method=True,string='Current Artist',type='selection',
> selection=[('current','Current'),('unused','Unused')], Help="Person is part
> of the current Album/Track", store=True),
>
> the data are stored correctly (in a text field ?) in the database
> web browser works, GTK seems to have a similar problem
>
> Traceback (most recent call last):
> File "/usr/lib64/python2.6/site-packages/Koo/Dialogs/TreeWidget.py", line
> 269, in open self.executeAction( 'tree_but_open', id )
> File "/usr/lib64/python2.6/site-packages/Koo/Dialogs/TreeWidget.py", line
> 262, in executeAction Api.instance.executeKeyword(keyword,
> {'model':self.model, 'id':id, 'report_type':report_type, 'ids': [id]}) File
> "./koo.py", line 127, in executeKeyword
> return Koo.Actions.executeKeyword( keyword, data, context )
> File "/usr/lib64/python2.6/site-packages/Koo/Actions/Actions.py", line
> 224, in executeKeyword Api.instance.executeAction(action, data,
> context=context)
> File "./koo.py", line 124, in executeAction
> Koo.Actions.executeAction( action, data, context )
> File "/usr/lib64/python2.6/site-packages/Koo/Actions/Actions.py", line
> 173, in executeAction target=target )
> File "./koo.py", line 133, in createWindow
> view_type, window, context, mode, name, autoReload, target )
> File "/usr/lib64/python2.6/site-packages/Koo/Dialogs/WindowService.py",
> line 51, in createWindow context=context, name=name )
> File "/usr/lib64/python2.6/site-packages/Koo/Dialogs/FormWidget.py", line
> 108, in __init__ self.screen.setupViews( view_type, view_ids )
> File "/usr/lib64/python2.6/site-packages/Koo/Screen/Screen.py", line 142,
> in setupViews self.switchView()
> File "/usr/lib64/python2.6/site-packages/Koo/Screen/Screen.py", line 361,
> in switchView self.setView( self.currentView() )
> File "/usr/lib64/python2.6/site-packages/Koo/Screen/Screen.py", line 610,
> in currentView self.addViewByIdAndType( id, type )
> File "/usr/lib64/python2.6/site-packages/Koo/Screen/Screen.py", line 383,
> in addViewByIdAndType return self.addView( view['arch'], view['fields'],
> display, toolbar=view.get('toolbar', False), id=view.get('view_id',False) )
> File "/usr/lib64/python2.6/site-packages/Koo/Screen/Screen.py", line 449,
> in addView view = ViewFactory.create(id, self, self.resource, dom,
> self.fields) File
> "/usr/lib64/python2.6/site-packages/Koo/View/ViewFactory.py", line 73, in
> create return parser.create(viewId, parent, model, node, fields)
> File "/usr/lib64/python2.6/site-packages/Koo/View/Tree/Parser.py", line
> 95, in create fields[fname]['readonly'] = bool(int(node_attrs['readonly']))
> ValueError: invalid literal for int() with base 10: 'True'
>
> ** Affects: openobject-client-kde
> Importance: Undecided
> Status: New

--
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: +34 669 40 40 18