pending
parent
1c6275e72c
commit
5401f44a1c
|
@ -31,8 +31,9 @@
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
<foot>
|
<foot>
|
||||||
<button string="Confirm" type="success" method="confirm" states="draft" />
|
<button string="Pending" type="default" method="pending" states="draft" />
|
||||||
<button string="Discard" type="danger" method="cancel" states="draft" />
|
<button string="Confirm" type="success" method="confirm" states="pending" />
|
||||||
|
<button string="Discard" type="danger" method="cancel" states="pending" />
|
||||||
</foot>
|
</foot>
|
||||||
<related>
|
<related>
|
||||||
<field name="hd_cases" readonly="1"/>
|
<field name="hd_cases" readonly="1"/>
|
||||||
|
|
|
@ -30,6 +30,7 @@ class Migration(migration.Migration):
|
||||||
'patient_id': patient.id,
|
'patient_id': patient.id,
|
||||||
'doctor_id': doctor.id,
|
'doctor_id': doctor.id,
|
||||||
'department_id': department.id,
|
'department_id': department.id,
|
||||||
|
'state': 'pending',
|
||||||
}
|
}
|
||||||
# find cycle
|
# find cycle
|
||||||
dttran=line.get("dttran")
|
dttran=line.get("dttran")
|
||||||
|
|
|
@ -417,4 +417,10 @@ class Visit(Model):
|
||||||
vals['visit_date']=obj.time_start[0:10]
|
vals['visit_date']=obj.time_start[0:10]
|
||||||
super().write(ids,vals,**kw)
|
super().write(ids,vals,**kw)
|
||||||
|
|
||||||
|
def pending(self,ids,context={}):
|
||||||
|
obj=self.browse(ids)[0]
|
||||||
|
obj.write({
|
||||||
|
'state': 'pending',
|
||||||
|
})
|
||||||
|
|
||||||
Visit.register()
|
Visit.register()
|
||||||
|
|
Loading…
Reference in New Issue