From 2326aa85b780305dc199cb3789d4aaeaf5bbab3c Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Mon, 27 Apr 2015 18:42:33 +0700 Subject: [PATCH] xxx --- netforce_clinic/models/setting.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index eba1b38..671c683 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -186,8 +186,20 @@ class ClinicSetting(Model): for pt, vals in pts.items(): vals=sorted(vals,key=lambda x: x['date']) count=len(vals) + no=0 if count > 1: - print(vals) + id_lines=[] + for val in vals: + print(val['id'], val['name']) + no+=1 + pt_id=val['id'] + if no==len(vals): + # hdcase + # visit + # dialyzer + print('---> ', pt_id, id_lines) + else: + id_lines.append(pt_id) print('='*50, 'staffs duplicate') for st in get_model("clinic.staff").search_browse([]):