change visit
parent
4326614a04
commit
dbf0d685c3
|
@ -41,6 +41,7 @@ class ChangeVisit(Model):
|
||||||
|
|
||||||
def do_change(self,ids,context):
|
def do_change(self,ids,context):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
|
context['branch_id']=obj.department_id.branch_id.id
|
||||||
dom=[
|
dom=[
|
||||||
['visit_date','=',obj.visit_date],
|
['visit_date','=',obj.visit_date],
|
||||||
['patient_id','=',obj.patient_id.id],
|
['patient_id','=',obj.patient_id.id],
|
||||||
|
@ -60,7 +61,7 @@ class ChangeVisit(Model):
|
||||||
'time_stop': obj.time_stop,
|
'time_stop': obj.time_stop,
|
||||||
'visit_date': obj.visit_date,
|
'visit_date': obj.visit_date,
|
||||||
'state': 'pending',
|
'state': 'pending',
|
||||||
})
|
},context=context)
|
||||||
obj.visit_id.to_draft()
|
obj.visit_id.to_draft()
|
||||||
obj.visit_id.cancel()
|
obj.visit_id.cancel()
|
||||||
visit=get_model("clinic.visit").browse(new_id)
|
visit=get_model("clinic.visit").browse(new_id)
|
||||||
|
|
Loading…
Reference in New Issue