From 86c9042258121a9f2226aef3451306264bc56d54 Mon Sep 17 00:00:00 2001 From: James Curtis Date: Fri, 6 Apr 2018 17:36:26 +0100 Subject: [PATCH] [FIX][T13963] Nurse isn't assigned to a ward, it is implied --- nh_eobs/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nh_eobs/api.py b/nh_eobs/api.py index 1b1e3696..b4bc9824 100644 --- a/nh_eobs/api.py +++ b/nh_eobs/api.py @@ -637,7 +637,7 @@ def get_all_patients(self, cr, uid, ids, context=None): # The list of all patients needs to be filtered by locations (Wards) that the current user is assigned to obj_res_users = self.pool['res.users'] user_record = obj_res_users.browse(cr, uid, uid, context=context) - user_locations = [x.name for x in user_record.location_ids] + user_locations = [x.parent_id.name for x in user_record.location_ids] filtered_patient_list = [x for x in patient_list if x['parent_location'] in user_locations] return filtered_patient_list