#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( self.doc.write_text(
ReportUtils.born_str(self.database, person, first)) ReportUtils.born_str(self.database, person, first))
self.doc.write_text(
ReportUtils.baptised_str(self.database, person, 0))
self.doc.write_text( self.doc.write_text(
ReportUtils.died_str(self.database, person, 0)) ReportUtils.died_str(self.database, person, 0))
self.doc.write_text( self.doc.write_text(

View File

@ -246,6 +246,11 @@ class DetAncestorReport(Report):
self.doc.write_text(text) self.doc.write_text(text)
first = 0 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) age,units = self.calc_age(person)
text = ReportUtils.died_str(self.database, person, first, self.verbose, text = ReportUtils.died_str(self.database, person, first, self.verbose,
self.EMPTY_DATE, self.EMPTY_PLACE, age, units) self.EMPTY_DATE, self.EMPTY_PLACE, age, units)
@ -578,7 +583,8 @@ class DetAncestorReport(Report):
event = self.database.get_event_from_handle(event_ref.ref) event = self.database.get_event_from_handle(event_ref.ref)
if event: if event:
etype = event.get_type() 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.BIRTH or \
etype == gen.lib.EventType.DEATH : etype == gen.lib.EventType.DEATH :
has_info = True has_info = True
@ -618,6 +624,13 @@ class DetAncestorReport(Report):
self.doc.write_text(text) self.doc.write_text(text)
print_name = 0 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) age, units = self.calc_age(ind)
text = ReportUtils.died_str(self.database, ind, print_name, text = ReportUtils.died_str(self.database, ind, print_name,
self.verbose, self.EMPTY_DATE, self.EMPTY_PLACE, self.verbose, self.EMPTY_DATE, self.EMPTY_PLACE,

View File

@ -494,6 +494,11 @@ class DetDescendantReport(Report):
self.doc.write_text(text) self.doc.write_text(text)
first = 0 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) age,units = self.calc_age(person)
text = ReportUtils.died_str(self.database, person, first, self.verbose, text = ReportUtils.died_str(self.database, person, first, self.verbose,
self.EMPTY_DATE, self.EMPTY_PLACE, age, units) self.EMPTY_DATE, self.EMPTY_PLACE, age, units)