ozwyzard
unread,May 30, 2011, 4:03:42 PM5/30/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sprox
Does sprox support __add_fields__ for RecordViewBase?
class record_view_type(MyRecordViewBase):
__model__ = ResourceNote
__add_fields__ = {'f_Author': None}
__limit_fields__ = ['f_Author', 'Name', 'Summary', 'Text']
__field_order = ['f_Author', 'Name', 'Summary', 'Text']
__headers__ = {'f_Author' : 'Author'}
class record_view_filler_type(MyRecordFiller):
__model__ = ResourceNote
__add_fields__ = {'f_Author': None}
def f_Author(self, obj, **kw):
return pmo.objattr(cls=User, id=obj.Author,
attr='user_name')
With the above code, I verified that f_Author() is indeed invoked and
the value is added to the values dictionary. I also verified that the
self.___widget__ in viewbase.py has the f_Author Widget as a child, as
in Widget('f_Author', children=[], **{}).
But the value for f_Author is *not* getting rendered.
Incidentally, similar functionality for the get_all() data_grid *does*
get rendered.
I have spent many hours digging through this. If anyone has further
pointers, kindly reply.
Thanks!
ozwyzard