set available sickbed
parent
7474718073
commit
18e88f1ad6
|
@ -906,7 +906,10 @@ class HDCase(Model):
|
|||
context['date']=obj.date
|
||||
number=self._get_number(context=context)
|
||||
vals['number']=number
|
||||
|
||||
if obj.sickbed_id:
|
||||
obj.sickbed_id.write({
|
||||
'available': False,
|
||||
})
|
||||
# update start time
|
||||
st=get_model("clinic.setting").browse(1)
|
||||
if st.real_time:
|
||||
|
@ -916,6 +919,7 @@ class HDCase(Model):
|
|||
vals['time_stop']='%s %s'%(date,timenow)
|
||||
obj.write(vals)
|
||||
|
||||
|
||||
def discontinue(self,ids,context={}):
|
||||
obj=self.browse(ids)[0]
|
||||
# TODO pop to note
|
||||
|
@ -1115,7 +1119,7 @@ class HDCase(Model):
|
|||
# update sickbed
|
||||
if obj.sickbed_id:
|
||||
obj.sickbed_id.write({
|
||||
'available': False,
|
||||
'available': True,
|
||||
})
|
||||
obj.recompute_labor_cost()
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue