I am having trouble with the drop down so I went back to step by steep and
recreated it to the point of the dropdown list an I am getting an error
telling me that getTempCursor not recognized
the following is HoursBizobj.py file. What gives or not?? I reviewed the
other posts but ??
===============================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dabo
import datetime
class HoursBizobj(dabo.biz.dBizobj):
def afterInit(self):
self.DataSource = "hours"
self.KeyField = "pkid"
self.addFrom("hours")
self.addField("hours")
self.addField("billed")
self.addField("notes")
self.addField("servicedate")
self.addField("pkid")
def getClients(self):
"""Return a 2-tuple of lists of the client names and their
keys."""
crs = self.getTempCursor()
crs.execute("select pkid, clientname from clients order by
clientname")
ds = crs.getDataSet()
names = [rec["clientname"] for rec in ds]
keys = [rec["pkid"] for rec in ds]
names.insert(0, "Please enter a Client")
keys.insert(0, 0)
def validateRecord(self):
"""Returning anything other than an empty string from
this method will prevent the data from being saved.
"""
ret = ""
# Add your business rules here.
if self.Record.clientfk == 0:
ret = "You must select a valid client"
return ret
return (names, keys)
--
View this message in context:
http://old.nabble.com/getTempCursor-error-tp26962451p26962451.html
Sent from the dabo-users mailing list archive at Nabble.com.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]