[hd_case] get doctor name

conv_bal
watcha.h@almacom.co.th 2015-05-11 12:23:42 +07:00
parent 9cc5e7245b
commit afca84692b
2 changed files with 5 additions and 0 deletions

View File

@ -1324,6 +1324,10 @@ class HDCase(Model):
doctor+= 1
else:
nurse+=1
if not doctor_id:
for ps in obj.staffs:
if ps.type=="doctor":
doctor_id=ps.staff_id.id
res[obj.id]={
'total_doctor': doctor,
'total_nurse': nurse,

View File

@ -83,6 +83,7 @@ class ReportLaborCostStaff(Model):
if cycle_id:
dom.append(['hd_case_id.cycle_id','=',cycle_id])
lines=[]
print('dom ', dom)
for sline in get_model("clinic.hd.case.staff").search_browse(dom):
hdcase=sline.hd_case_id
staff=sline.staff_id