changeset 3419:3acfd5b4262d

GH HMIS server. health core. Update get_rec_name on patient and health professional. Thank you Tumashu !
author Luis Falcon <falcon@gnuhealth.org>
date Sat, 26 Oct 2019 19:28:36 +0100
parents 1445baaedd14
children a1c5ff440c2d
files tryton/health/health.py
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tryton/health/health.py
+++ b/tryton/health/health.py
@@ -1878,9 +1878,7 @@
 
     def get_rec_name(self, name):
         if self.name:
-            res = self.name.name
-            if self.name.lastname:
-                res = self.name.lastname + ', ' + self.name.name
+            res = self.name.rec_name
         return res
 
 class HealthProfessionalSpecialties(ModelSQL, ModelView):
@@ -3256,10 +3254,8 @@
         return res
 
     def get_rec_name(self, name):
-        if self.name.lastname:
-            return self.name.lastname + ', ' + self.name.name
-        else:
-            return self.name.name
+        if self.name:
+            return self.name.rec_name
 
     # Search by the patient name, lastname or PUID