From 9d9072dbf06167a5479358b0cfac176bf137d352 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Tue, 28 Apr 2015 18:15:36 +0700 Subject: [PATCH] filter product by code "MDC" --- .../models/report_medical_summary.py | 2 +- netforce_clinic/models/setting.py | 12 ++++++++---- netforce_clinic/reports/matching_hdcase.xlsx | Bin 5551 -> 5609 bytes 3 files changed, 9 insertions(+), 5 deletions(-) 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 95a801913095039b5648a33bfda07b540ac311c7..956878b1245b65d46b7a101e13900f5ac409680f 100644 GIT binary patch delta 4330 zcmZ9P1ymH@-^M8^Nm)=>Qkq4SkP?uNMH*2M5LcvJLb`{L1*E%{4(SkCkXTlhkWdK; zX=y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