From e320af2295ca38b81d52b3a81c52ff05b25de5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Tue, 22 Jul 2008 08:45:44 +0000 Subject: [PATCH] #2124: Baptism as alternate birth event on Det (Ancestral,Descendant) reports and Ancestral report svn: r10908 --- src/plugins/AncestorReport.py | 2 ++ src/plugins/DetAncestralReport.py | 23 ++++++++++++++++++----- src/plugins/DetDescendantReport.py | 13 +++++++++---- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/plugins/AncestorReport.py b/src/plugins/AncestorReport.py index 3045081eb..263b2ebe2 100644 --- a/src/plugins/AncestorReport.py +++ b/src/plugins/AncestorReport.py @@ -218,6 +218,8 @@ class AncestorReport(Report): self.doc.write_text( ReportUtils.born_str(self.database, person, first)) + self.doc.write_text( + ReportUtils.baptised_str(self.database, person, 0)) self.doc.write_text( ReportUtils.died_str(self.database, person, 0)) self.doc.write_text( diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 542e5a828..bfb051d07 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -235,8 +235,8 @@ class DetAncestorReport(Report): if not self.verbose: self.write_parents(person, first) - text = ReportUtils.born_str(self.database,person,first,self.verbose, - self.EMPTY_DATE,self.EMPTY_PLACE) + text = ReportUtils.born_str(self.database, person, first, self.verbose, + self.EMPTY_DATE, self.EMPTY_PLACE) if text: birth_ref = person.get_birth_ref() if birth_ref: @@ -246,9 +246,14 @@ class DetAncestorReport(Report): self.doc.write_text(text) first = 0 + text = ReportUtils.baptised_str(self.database, person, first, self.verbose, + self.EMPTY_DATE, self.EMPTY_PLACE) + if text: + self.doc.write_text(text) + age,units = self.calc_age(person) - text = ReportUtils.died_str(self.database,person,first,self.verbose, - self.EMPTY_DATE,self.EMPTY_PLACE,age,units) + text = ReportUtils.died_str(self.database, person, first, self.verbose, + self.EMPTY_DATE, self.EMPTY_PLACE, age, units) if text: death_ref = person.get_death_ref() if death_ref: @@ -578,7 +583,8 @@ class DetAncestorReport(Report): event = self.database.get_event_from_handle(event_ref.ref) if event: etype = event.get_type() - if etype == gen.lib.EventType.BURIAL or \ + if etype == gen.lib.EventType.BAPTISM or \ + etype == gen.lib.EventType.BURIAL or \ etype == gen.lib.EventType.BIRTH or \ etype == gen.lib.EventType.DEATH : has_info = True @@ -618,6 +624,13 @@ class DetAncestorReport(Report): self.doc.write_text(text) print_name = 0 + text = ReportUtils.baptised_str(self.database, ind, print_name, + self.verbose, self.EMPTY_DATE, self.EMPTY_PLACE) + + if text: + self.doc.write_text(text) + print_name = 0 + age, units = self.calc_age(ind) text = ReportUtils.died_str(self.database, ind, print_name, self.verbose, self.EMPTY_DATE, self.EMPTY_PLACE, diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index a58d81894..80f1f32aa 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -483,8 +483,8 @@ class DetDescendantReport(Report): if not self.verbose: self.write_parents(person, first) - text = ReportUtils.born_str(self.database,person,first, self.verbose, - self.EMPTY_DATE,self.EMPTY_PLACE) + text = ReportUtils.born_str(self.database, person, first, self.verbose, + self.EMPTY_DATE, self.EMPTY_PLACE) if text: birth_ref = person.get_birth_ref() if birth_ref: @@ -493,10 +493,15 @@ class DetDescendantReport(Report): text = text + self.endnotes(birth) + ". " self.doc.write_text(text) first = 0 + + text = ReportUtils.baptised_str(self.database, person, first, self.verbose, + self.EMPTY_DATE,self.EMPTY_PLACE) + if text: + self.doc.write_text(text) age,units = self.calc_age(person) - text = ReportUtils.died_str(self.database,person,first,self.verbose, - self.EMPTY_DATE,self.EMPTY_PLACE,age,units) + text = ReportUtils.died_str(self.database, person, first, self.verbose, + self.EMPTY_DATE, self.EMPTY_PLACE, age, units) if text: death_ref = person.get_death_ref() if death_ref: