class lead_target(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(lead_target, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'get_name':self.get_name,
'pool': self.pool,
})
self.context = context
def get_name(self, form):
crm_obj=pool.get('crm.lead')
sale_obj=self.pool.get('hr.employee')
for order in crm_obj.browse(cr, uid, id):
namev=val.name
print namev,"hhhhhhhhhhhhhhhhhhhhhhhhhhh"
print x
global name 'pool' is not defined
-------------------------------->if i do this i got this error (<type 'exceptions.nameerror'="">, NameError("global name 'pool' is not defined",), <traceback object="" at="" 0x7f070c2f0ea8="">)