diff --git a/netforce_clinic/models/report_medical_summary.py b/netforce_clinic/models/report_medical_summary.py index aaea893..577af77 100644 --- a/netforce_clinic/models/report_medical_summary.py +++ b/netforce_clinic/models/report_medical_summary.py @@ -29,7 +29,7 @@ class ReportMedicalSummary(Model): date_to=defaults.get('date_to',"%s-%s-%s"%(year,month,total_day)) categ_id=defaults.get('categ_id',None) if not categ_id: - categ_ids=get_model("product.categ").search([['code','=','EPO']]) + categ_ids=get_model("product.categ").search([['parent_id.code','=','MDC']]) if categ_ids: categ_id=categ_ids[0] branch_id=defaults.get('branch_id',None) diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index 96e32ef..9f79427 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -161,10 +161,14 @@ class ClinicSetting(Model): if user_id !=1: print("Only admin!!") return - for cost_line in get_model("clinic.labor.cost.line").search_browse([]): - cost_line.write({ - 'note': ' ', - }) + res={} + for l in get_model("clinic.hd.case.line").search_browse([]): + prod=l.product_id + categ=l.product_categ_id + res.setdefault(categ.name,[]).append(1) + for k,v in res.items(): + print(k, len(v)) + #obj=self.browse(ids)[0] #obj.del_duplicate_staff() print("Done!") diff --git a/netforce_clinic/reports/matching_hdcase.xlsx b/netforce_clinic/reports/matching_hdcase.xlsx index 95a8019..956878b 100644 Binary files a/netforce_clinic/reports/matching_hdcase.xlsx and b/netforce_clinic/reports/matching_hdcase.xlsx differ