Hi,
When you try to make more than one left join on a SQLFORM.grid as:
grid = SQLFORMCustom.grid(db.device,
fields=[db.device.serial, db.device.device_type, db.device.vehicle,
db.vehicle.plate, db.chip.imei, ],
field_id=db.device.id,
left=[db.chip.on(db.chip.id==db.device.chip),
db.vehicle.on(db.vehicle.id==db.device.vehicle)],
paginate=max_results,
showbuttontext=False,
formstyle='divs',
paginate_icons=paginate_icons,
sorter_icons=sorter_icons
)
it can't display the join fields as it dosen't find the fields on the query
in sqlhtml.py line 1083.
Can you apply this patch on line 1083?
if left is not None:
if isinstance(left, (list)):
for l in left:
tablenames += db._adapter.tables(l)
else:
tablenames += db._adapter.tables(left)
--