Hi all,
I am currently working on implementation of onchange event where i want to send 
query to postgre for the custom field value. i try to add this code in task 
class.
  
def onchange_selectsml(self, cr, uid, ids, selectsml, effective=0.0):        
        if (selectsml == '8'): 
           cr.execute("Select x_smallconf from project_project where name = 
'project_id' limit 1")
           stri = cr.fetchone()[0]
           return {'value':{'planned_hours': stri}}                    
        elif (selectsml == '16'):
           cr.execute("Select x_mediumconf from project_project where name = 
project_id limit 1")
           stri = cr.fetchone()[0]
           return {'value':{'planned_hours': stri}}
        elif (selectsml == '32'):
           cr.execute("Select x_largeconf from project_project where name='Open 
ERP Integration' limit 1")
           stri = cr.fetchone()[0]
           return {'value':{'planned_hours': stri}}
        return False

but when ever i try to fetch project_id from the task class i am getting the 
error message. 

Please help.
HINT: i made the changes in the project.py file.

Is there anything i am missing here???

thanks in advance,
Raghu[size=18][/size]




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=61251#61251

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to