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([]):