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