#2124: Baptism as alternate birth event on Det (Ancestral,Descendant) reports and Ancestral report

svn: r10908
This commit is contained in:
Jérôme Rapinat 2008-07-22 08:45:44 +00:00
parent 84ef4c4924
commit e320af2295
3 changed files with 29 additions and 9 deletions

View File

@ -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(

View File

@ -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,

View File

@ -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: