search department on visit board
parent
48141145b5
commit
faaeb2146c
|
@ -5,6 +5,7 @@
|
||||||
<field name="cycle_id" span="2"/>
|
<field name="cycle_id" span="2"/>
|
||||||
<field name="patient_id" span="2"/>
|
<field name="patient_id" span="2"/>
|
||||||
<field name="doctor_id" span="2"/>
|
<field name="doctor_id" span="2"/>
|
||||||
|
<field name="department_id" span="2"/>
|
||||||
<!--<group span="1" columns="1">-->
|
<!--<group span="1" columns="1">-->
|
||||||
<!--<button string="New Visit" method="make_visit" span="1" icon="plus" type="success" size="small"/>-->
|
<!--<button string="New Visit" method="make_visit" span="1" icon="plus" type="success" size="small"/>-->
|
||||||
<!--</group>-->
|
<!--</group>-->
|
||||||
|
|
|
@ -31,6 +31,7 @@ class VisitBoard(Model):
|
||||||
"date_to": fields.Date("To", required=True),
|
"date_to": fields.Date("To", required=True),
|
||||||
'patient_id': fields.Many2One("clinic.patient","Patient"),
|
'patient_id': fields.Many2One("clinic.patient","Patient"),
|
||||||
'cycle_id': fields.Many2One("clinic.cycle","Cycle"),
|
'cycle_id': fields.Many2One("clinic.cycle","Cycle"),
|
||||||
|
'department_id': fields.Many2One("clinic.department","Department"),
|
||||||
'doctor_id': fields.Many2One("clinic.staff","Doctor",domain=[["type","=","doctor"]]),
|
'doctor_id': fields.Many2One("clinic.staff","Doctor",domain=[["type","=","doctor"]]),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@ class VisitBoard(Model):
|
||||||
patient_id=None
|
patient_id=None
|
||||||
cycle_id=None
|
cycle_id=None
|
||||||
doctor_id=None
|
doctor_id=None
|
||||||
|
department_id=None
|
||||||
if ids:
|
if ids:
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
date_from=obj.date_from
|
date_from=obj.date_from
|
||||||
|
@ -56,6 +58,7 @@ class VisitBoard(Model):
|
||||||
patient_id=obj.patient_id.id
|
patient_id=obj.patient_id.id
|
||||||
cycle_id=obj.cycle_id.id
|
cycle_id=obj.cycle_id.id
|
||||||
doctor_id=obj.doctor_id.id
|
doctor_id=obj.doctor_id.id
|
||||||
|
department_id=obj.department_id.id
|
||||||
|
|
||||||
time_start='%s 00:00:00'%(date_from)
|
time_start='%s 00:00:00'%(date_from)
|
||||||
time_stop='%s 23:59:59'%(date_to)
|
time_stop='%s 23:59:59'%(date_to)
|
||||||
|
@ -69,6 +72,8 @@ class VisitBoard(Model):
|
||||||
dom.append(['cycle_id','=',cycle_id])
|
dom.append(['cycle_id','=',cycle_id])
|
||||||
if doctor_id:
|
if doctor_id:
|
||||||
dom.append(['doctor_id','=',doctor_id])
|
dom.append(['doctor_id','=',doctor_id])
|
||||||
|
if department_id:
|
||||||
|
dom.append(['department_id','=',department_id])
|
||||||
|
|
||||||
lines=[]
|
lines=[]
|
||||||
empty_line={
|
empty_line={
|
||||||
|
|
Loading…
Reference in New Issue