get patient name

conv_bal
Test server 2014-10-01 13:51:36 +07:00
parent 65739b0a3d
commit 0c897d79b8
4 changed files with 9 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<menu string="Clinic"> <menu string="Clinic">
<item string="Dashboard" action="clinic_board"/> <item string="Dashboard" action="clinic_board"/>
<item string="Patient" action="clinic_patient"/>
<item string="Doctor" action="clinic_doctor"/> <item string="Doctor" action="clinic_doctor"/>
<item string="Nurse" action="clinic_nurse"/> <item string="Nurse" action="clinic_nurse"/>
<item string="Patient" action="clinic_patient"/>
<item string="Visit" action="clinic_visit"/> <item string="Visit" action="clinic_visit"/>
<item string="HD Case Treatment" action="clinic_hd_case"/> <item string="HD Case Treatment" action="clinic_hd_case"/>
<item string="Dialyzer" action="clinic_dialyzer"/> <item string="Dialyzer" action="clinic_dialyzer"/>

View File

@ -4,7 +4,7 @@ import time
from netforce.access import get_active_user,set_active_user from netforce.access import get_active_user,set_active_user
from netforce.access import get_active_company from netforce.access import get_active_company
class Hdcase(Model): class HDcase(Model):
_name="clinic.hd.case" _name="clinic.hd.case"
_string="HD Case Treatment" _string="HD Case Treatment"
_audit_log=True _audit_log=True
@ -80,7 +80,6 @@ class Hdcase(Model):
obj=self.browse(ids)[0] obj=self.browse(ids)[0]
obj.write({"state":"canceled"}) obj.write({"state":"canceled"})
def confirmed(self,ids,context={}): def confirmed(self,ids,context={}):
obj=self.browse(ids)[0] obj=self.browse(ids)[0]
obj.write({"state":"confirmed"}) obj.write({"state":"confirmed"})
@ -203,4 +202,4 @@ class Hdcase(Model):
} }
return vals return vals
Hdcase.register() HDcase.register()

View File

@ -144,6 +144,12 @@ class Patient(Model):
} }
_order="date desc,number desc" _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={}): def void(self,ids,context={}):
obj=self.browse(ids)[0] obj=self.browse(ids)[0]