Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nh_eobs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down