From 4f11da524c44f88056e85c08d9b11aaddb67b115 Mon Sep 17 00:00:00 2001 From: David Janssens Date: Tue, 19 Aug 2014 13:11:57 +0700 Subject: [PATCH] xxx --- scripts/hospital.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/hospital.py b/scripts/hospital.py index 28515d3..1bdd609 100644 --- a/scripts/hospital.py +++ b/scripts/hospital.py @@ -1,8 +1,11 @@ +from netforce.model import add_method,add_default from datetime import * from dateutil.relativedelta import * +import logging @add_method("hos.patient") def get_age(self,ids,context={}): + logging.info("get_age") vals={} for obj in self.browse(ids): if obj.birth_date: @@ -14,9 +17,11 @@ def get_age(self,ids,context={}): @add_method("hos.visit") def set_done(self,ids,context={}): + logging.info("set_done") obj=self.browse(ids)[0] obj.write({"state":"done"}) @add_default("hos.visit","date") def get_date(self,context={}): + logging.info("get_date") return datetime.today().strftime("%Y-%m-%d") \ No newline at end of file