conv_bal
watcha.h@almacom.co.th 2015-06-12 06:42:08 +07:00
parent 1a61b83116
commit a1be6b9bcc
2 changed files with 9 additions and 3 deletions

View File

@ -3,6 +3,7 @@ from netforce.model import Model, fields
class PatientCycle(Model):
_name="clinic.patient.cycle"
_string="Patient Cycle"
_audit_log=True
_fields={
"patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True,domain=[['state','=','admit']]),

View File

@ -87,13 +87,18 @@ class VisitPopupConfirm(Model):
obj=self.browse(ids)[0]
board=obj.visitboard_id
count=0
user_id=get_active_user()
nurse_ids=get_model("clinic.staff").search([['user_id','=',user_id],['type','=','nurse']])
vals={}
if nurse_ids:
vals['nurse_id']=nurse_ids[0]
for line in obj.lines:
vs=line.visit_id
dt=line.doctor_id
if dt:
vs.write({
'doctor_id': dt.id,
})
vals['doctor_id']=dt.id
vs.write(vals)
vs.confirm()
count+=1
return {