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