Hii all,

for the past few days I was trying my hands on inheritance and i have done
single Inheritance but in case of multiple inheritance i  am facing  a
problem here is my code

 *Model:*

*# Creating a master table for storing vehicle names.*

db.define_table("tblVehicleName",
      Field("VehicleName",  length=45, notnull=True,
default=None,unique=True,label='Vehicle Name'),
      format='%(VehicleName)s'
      )

*# Creating tblVehicle which is getting the data from the master table and
adding a new field say Vehicle no*

db.define_table("tblVehicle",
      Field("VehicleName",db.tblVehicleName,label='Vehicle Name'),
      Field("VehicleNo", default=None,label='VehicleNo'))
db.tblVehicle.VehicleName.requires=IS_IN_DB(db,'tblVehicleName.id','%(VehicleName)s')

* # Creating tblDriver adding Driver name and selecting the name of vehicle
from the dropdown*

db.define_table("tblDriver",
      Field("DriverName",'string',label='Driver Name'),
      Field('id_tblVehicle', db.tblVehicle,label='Vehicle Name'))
db.tblDriver.id_tblVehicle.requires=IS_IN_DB(db, 'tblVehicle.VehicleName')

the problem is that when i am trying to add driver information in the
tblDriver then in the dropdown i am getting vehicle no instead of Vehicle
name .
after this i tried few options but nothing works.
so can any one help me out of this situation.


Thanks

Naleen Yadav
GENPRO Technologies pvt Ltd.

Reply via email to