From a2136d09e99c545bbbcbcffd0331f97bfd59388f Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Fri, 23 Jan 2015 07:13:14 +0700 Subject: [PATCH] fix --- netforce_clinic/models/report_hd_case_summary.py | 4 ++-- netforce_clinic/models/visit.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index 3aaa705..0e42490 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -63,14 +63,14 @@ class ReportHDCaseSummary(Model): time_stop='%s-%s-%s 23:59:59'%(year,str(crr_month).zfill(2),crr_total_day) dom.append(["time_start",">=",time_start]) dom.append(["time_stop","<=",time_stop]) - dom.append(["state","=","completed"]) + dom.append(["state","in",["completed","waiting_payment","paid"]]) crr_total=len(get_model("clinic.hd.case").search(dom)) items={} items['topic%s'%count]={ 'month': month_str, 'qty': crr_total or 0, 'action': 'clinic_hd_case', - 'action_options': 'mode=list&search_domain=%s&tab_no=4'%replace_quote('%s'%dom), + 'action_options': 'mode=list&search_domain=%s&tab_no=0'%replace_quote('%s'%dom), } count+=1 diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index 8b2e82f..c055849 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -264,6 +264,7 @@ class Visit(Model): dom=[ ['branch_id','=',branch.id], ['department_id','=',department.id], + ['cycle_id','=',cycle.id], ] for item2 in get_model("clinic.cycle.item").search_browse([]): lines=[] @@ -280,7 +281,6 @@ class Visit(Model): 'lines': lines, }) break - obj.write({ 'cycle_item_id': item_id, })