I get an error when I try to run my module AttributeError: 'NoneType' object has no attribute 'name_search'
Below is my code, please assist:
def _get_countries(self, cr, uid, context=None):
cr.execute('SELECT res_country.code,res_country.name FROM res_country ORDER BY name')
return cr.fetchall()
'nationality':fields.reference('Nationality', type='selection', selection=(_get_countries ), method=True), ???
https://docs.google.com/a/digitaltreasure.co.bw/file/d/0B_BAgvBBQn_KMXFvZGtWaExmRDg/edit
try using function field,, field.function(type='selection')... update me if that solves the problem
def _get_countries(self, cr, uid, context=None):
cr.execute('SELECT res_country.code,res_country.name FROM res_country ORDER BY name')
return cr.fetchall()
'nationality':fields.selection(_get_countries,'Nationality',required=True),