From 0c897d79b836f25de5b264d4be3afa923ffc18b6 Mon Sep 17 00:00:00 2001 From: Test server Date: Wed, 1 Oct 2014 13:51:36 +0700 Subject: [PATCH] get patient name --- .../__pycache__/__init__.cpython-32.pyc | Bin 159 -> 0 bytes netforce_clinic/layouts/clinic_menu.xml | 2 +- netforce_clinic/models/clinic_hd_case.py | 5 ++--- netforce_clinic/models/clinic_patient.py | 6 ++++++ 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 netforce_clinic/controllers/__pycache__/__init__.cpython-32.pyc diff --git a/netforce_clinic/controllers/__pycache__/__init__.cpython-32.pyc b/netforce_clinic/controllers/__pycache__/__init__.cpython-32.pyc deleted file mode 100644 index ccf8cbcf10a19f73d287992ec65370d6032e3232..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159 zcmd1d;pJlgCm)i`fCLzUYzH7NW&si@3=F{(c_l^pIXS6C#rpB_KqV#d@p=W7r5r$mY;yBcN^?@} KK-LulF#`bk<|H@( diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 37b1db3..41377c6 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -1,8 +1,8 @@ - + diff --git a/netforce_clinic/models/clinic_hd_case.py b/netforce_clinic/models/clinic_hd_case.py index 86b2821..fedbe5b 100644 --- a/netforce_clinic/models/clinic_hd_case.py +++ b/netforce_clinic/models/clinic_hd_case.py @@ -4,7 +4,7 @@ import time from netforce.access import get_active_user,set_active_user from netforce.access import get_active_company -class Hdcase(Model): +class HDcase(Model): _name="clinic.hd.case" _string="HD Case Treatment" _audit_log=True @@ -80,7 +80,6 @@ class Hdcase(Model): obj=self.browse(ids)[0] obj.write({"state":"canceled"}) - def confirmed(self,ids,context={}): obj=self.browse(ids)[0] obj.write({"state":"confirmed"}) @@ -203,4 +202,4 @@ class Hdcase(Model): } return vals -Hdcase.register() +HDcase.register() diff --git a/netforce_clinic/models/clinic_patient.py b/netforce_clinic/models/clinic_patient.py index cff713e..8170226 100644 --- a/netforce_clinic/models/clinic_patient.py +++ b/netforce_clinic/models/clinic_patient.py @@ -144,6 +144,12 @@ class Patient(Model): } _order="date desc,number desc" + def name_get(self,ids,context={}): + vals=[] + for obj in self.browse(ids): + name='%s %s'%(obj.first_name or "", obj.last_name or "") + vals.append((obj.id,name)) + return vals def void(self,ids,context={}): obj=self.browse(ids)[0]