Hello Sir,
I have two tables called 'Site Attendance Details' and 'DSR Attendance Detail'.
From Site Attendance Details details am selecting some columns,and am passing these column values to the query.
The query result columns I want to set for the 'DSR Attendance Detail'.
if not getlist(self.doclist, 'dsr_attendance_details'):
newlist = model.copytables('Site Attendance Details', site, 'site_attendance_details', 'DSR Attendance Detail', self.doc, 'dsr_attendance_details', ['employee_type','category','emp_name'])
#msgprint(len(newlist))
site_id=self.doc.site_id
for r in newlist:
employee_type=r.employee_type
category=r.category
if(r.employee_type!='Contract'):
res=sql("select employee_type,category,emp_name from `tabEmployee` where site_id=%s and employee_type=%s and category=%s",(self.doc.site_id,employee_type,category))
#msgprint(cstr(res1))
r.employee_type=res[0][0]
r.category=res[0][1]
r.emp_name=res[0][2]
self.doclist += newlist
am not able to set all the columns of the query result.
Regards,
Nikhil
–
You received this message because you are subscribed to the Google Groups “Web Notes Framework Forum” group.
To post to this group, send email to wn...@googlegroups.com.
To unsubscribe from this group, send email to wnframework+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wnframework?hl=en.