conv_bal
watcha.h 2014-12-15 13:24:58 +07:00
parent 1c6275e72c
commit 5401f44a1c
3 changed files with 10 additions and 2 deletions

View File

@ -31,8 +31,9 @@
</tab>
</tabs>
<foot>
<button string="Confirm" type="success" method="confirm" states="draft" />
<button string="Discard" type="danger" method="cancel" states="draft" />
<button string="Pending" type="default" method="pending" states="draft" />
<button string="Confirm" type="success" method="confirm" states="pending" />
<button string="Discard" type="danger" method="cancel" states="pending" />
</foot>
<related>
<field name="hd_cases" readonly="1"/>

View File

@ -30,6 +30,7 @@ class Migration(migration.Migration):
'patient_id': patient.id,
'doctor_id': doctor.id,
'department_id': department.id,
'state': 'pending',
}
# find cycle
dttran=line.get("dttran")

View File

@ -417,4 +417,10 @@ class Visit(Model):
vals['visit_date']=obj.time_start[0:10]
super().write(ids,vals,**kw)
def pending(self,ids,context={}):
obj=self.browse(ids)[0]
obj.write({
'state': 'pending',
})
Visit.register()