conv_bal
watcha.h 2015-03-02 14:36:17 +07:00
parent 605671e4f5
commit 6bca8eb033
1 changed files with 3 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class Patient(Model):
'categ_id': fields.Many2One("clinic.patient.categ","Category"),
'doctor_id': fields.Many2One("clinic.staff","Doctor",domain=[['type','=','doctor']]),
"documents": fields.One2Many("document","related_id","Documents"),
'resign_date': fields.Date("Resign Date"),
'resign_date': fields.Date("Dispose Date"),
'rm_remain_visit': fields.Boolean("Auto Remove Remaining Visit"),
'department_id': fields.Many2One("clinic.department","Department",search=True),
'cycle_id': fields.Many2One("clinic.cycle","Last Cycle",function="_get_last_cycle"),
@ -248,6 +248,8 @@ class Patient(Model):
if 'dispose' in vals.keys():
if vals['dispose']:
vals['state']='dispose'
if not vals.get("resign_date"):
vals['resign_date']=time.strftime("%Y-%m-%d")
else:
vals['state']='admit'
if 'card_no' in vals.keys():