[web2py] problem export virtual field to CSV using grid

2018-04-08 Thread Vic Ding
Hi all, I am having issue exporting virtual fields to CSV using grid. It displays fine though. I defined field in this way Field.Virtual('cost_value', lambda row: row.inventory.cost_price_avg * row.inventory.qty, label=T('Stock value')), When I export it to CSV in grid I got the following

[web2py] Problem with virtual field

2013-07-30 Thread Eduardo Cruz
Hi, I have this table db.define_table('station', dates, Field('name', 'string', unique=True), Field('average_time', 'integer'), Field('area_id', 'reference area', requires=IS_IN_DB(db, 'area.id', '%(name)s') ,label=Area,

[web2py] Problem with virtual field

2013-07-30 Thread Loïc
Did you try Field.Virtual('area_name', lambda row: db.area(row.area_id).name), ? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to