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
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,
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
3 matches
Mail list logo