fix
parent
1a61b83116
commit
a1be6b9bcc
|
@ -3,6 +3,7 @@ from netforce.model import Model, fields
|
||||||
class PatientCycle(Model):
|
class PatientCycle(Model):
|
||||||
_name="clinic.patient.cycle"
|
_name="clinic.patient.cycle"
|
||||||
_string="Patient Cycle"
|
_string="Patient Cycle"
|
||||||
|
_audit_log=True
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
"patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True,domain=[['state','=','admit']]),
|
"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]
|
obj=self.browse(ids)[0]
|
||||||
board=obj.visitboard_id
|
board=obj.visitboard_id
|
||||||
count=0
|
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:
|
for line in obj.lines:
|
||||||
vs=line.visit_id
|
vs=line.visit_id
|
||||||
dt=line.doctor_id
|
dt=line.doctor_id
|
||||||
if dt:
|
if dt:
|
||||||
vs.write({
|
vals['doctor_id']=dt.id
|
||||||
'doctor_id': dt.id,
|
vs.write(vals)
|
||||||
})
|
|
||||||
vs.confirm()
|
vs.confirm()
|
||||||
count+=1
|
count+=1
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue