[tryton-debian-vcs] tryton-modules-health-socioeconomics branch upstream updated. upstream/3.0.1-1-gab4f38d
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Aug 10 19:16:30 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-health-socioeconomics.git;a=commitdiff;h=upstream/3.0.1-1-gab4f38d
commit ab4f38d35ce241623a9d4222741f4646efdb0053
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Aug 10 18:39:24 2016 +0200
Adding upstream version 3.0.2.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/PKG-INFO b/PKG-INFO
index c63e167..8f03484 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_health_socioeconomics
-Version: 3.0.1
+Version: 3.0.2
Summary: GNU Health Socioeconomics Module
Home-page: http://health.gnu.org/
Author: GNU Solidario
diff --git a/health_socioeconomics.py b/health_socioeconomics.py
index ae5a6bb..c47b14d 100644
--- a/health_socioeconomics.py
+++ b/health_socioeconomics.py
@@ -65,11 +65,12 @@ class PatientSESAssessment(ModelSQL, ModelView):
assessment_date = fields.DateTime('Date', help="Assessment date",
states = STATES)
- computed_age = fields.Function(fields.TimeDelta(
+
+ computed_age = fields.Function(fields.Char(
'Age',
help="Computed patient age at the moment of the evaluation"),
'patient_age_at_assessment')
-
+
health_professional = fields.Many2One(
'gnuhealth.healthprofessional', 'Health Professional', readonly=True,
help="Health professional"
@@ -273,10 +274,14 @@ class PatientSESAssessment(ModelSQL, ModelView):
})
-
def patient_age_at_assessment(self, name):
if (self.patient.name.dob and self.assessment_date):
- return self.assessment_date.date() - self.patient.name.dob
+ rdelta = relativedelta (self.assessment_date.date(),
+ self.patient.name.dob)
+ years_months_days = str(rdelta.years) + 'y ' \
+ + str(rdelta.months) + 'm ' \
+ + str(rdelta.days) + 'd'
+ return years_months_days
else:
return None
diff --git a/tryton.cfg b/tryton.cfg
index a5a6c76..3ffadbd 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.1
+version=3.0.2
depends:
health
xml:
diff --git a/trytond_health_socioeconomics.egg-info/PKG-INFO b/trytond_health_socioeconomics.egg-info/PKG-INFO
index e206d2a..57dcef9 100644
--- a/trytond_health_socioeconomics.egg-info/PKG-INFO
+++ b/trytond_health_socioeconomics.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-health-socioeconomics
-Version: 3.0.1
+Version: 3.0.2
Summary: GNU Health Socioeconomics Module
Home-page: http://health.gnu.org/
Author: GNU Solidario
diff --git a/trytond_health_socioeconomics.egg-info/requires.txt b/trytond_health_socioeconomics.egg-info/requires.txt
index b3a667a..5537172 100644
--- a/trytond_health_socioeconomics.egg-info/requires.txt
+++ b/trytond_health_socioeconomics.egg-info/requires.txt
@@ -1,2 +1,2 @@
-trytond_health == 3.0.1
+trytond_health == 3.0.2
trytond >= 3.8, < 3.9
--
tryton-modules-health-socioeconomics
More information about the tryton-debian-vcs
mailing list