fix
parent
1a61b83116
commit
a1be6b9bcc
|
@ -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']]),
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue