Fixed report
svn: r2920
This commit is contained in:
parent
720b43b977
commit
e94e313a16
@ -116,7 +116,13 @@ class IndivSummary(Report.Report):
|
|||||||
return
|
return
|
||||||
name = const.display_event(event.get_name())
|
name = const.display_event(event.get_name())
|
||||||
date = event.get_date()
|
date = event.get_date()
|
||||||
place = event.get_place_name()
|
place_id = event.get_place_id()
|
||||||
|
if place_id:
|
||||||
|
place_obj = self.database.find_place_from_id(place_id)
|
||||||
|
place = place_obj.get_title()
|
||||||
|
else:
|
||||||
|
place = ""
|
||||||
|
|
||||||
description = event.get_description()
|
description = event.get_description()
|
||||||
if date == "":
|
if date == "":
|
||||||
if place == "":
|
if place == "":
|
||||||
@ -161,11 +167,17 @@ class IndivSummary(Report.Report):
|
|||||||
self.d.end_cell()
|
self.d.end_cell()
|
||||||
self.d.end_row()
|
self.d.end_row()
|
||||||
|
|
||||||
for family in self.person.get_family_id_list():
|
for family_id in self.person.get_family_id_list():
|
||||||
if self.person == family.get_father_id():
|
family = self.database.find_family_from_id(family_id)
|
||||||
spouse = family.get_mother_id()
|
if self.person.get_id() == family.get_father_id():
|
||||||
|
spouse_id = family.get_mother_id()
|
||||||
else:
|
else:
|
||||||
spouse = family.get_father_id()
|
spouse_id = family.get_father_id()
|
||||||
|
if spouse_id:
|
||||||
|
spouse = self.database.find_person_from_id(spouse_id)
|
||||||
|
else:
|
||||||
|
spouse = None
|
||||||
|
|
||||||
self.d.start_row()
|
self.d.start_row()
|
||||||
self.d.start_cell("IVS-NormalCell",2)
|
self.d.start_cell("IVS-NormalCell",2)
|
||||||
self.d.start_paragraph("IVS-Spouse")
|
self.d.start_paragraph("IVS-Spouse")
|
||||||
@ -177,7 +189,8 @@ class IndivSummary(Report.Report):
|
|||||||
self.d.end_cell()
|
self.d.end_cell()
|
||||||
self.d.end_row()
|
self.d.end_row()
|
||||||
|
|
||||||
for event in family.get_event_list():
|
for event_id in family.get_event_list():
|
||||||
|
event = self.database.find_event_from_id(event_id)
|
||||||
self.write_fact(event)
|
self.write_fact(event)
|
||||||
|
|
||||||
child_list = family.get_child_id_list()
|
child_list = family.get_child_id_list()
|
||||||
@ -193,11 +206,12 @@ class IndivSummary(Report.Report):
|
|||||||
self.d.start_paragraph("IVS-Normal")
|
self.d.start_paragraph("IVS-Normal")
|
||||||
|
|
||||||
first = 1
|
first = 1
|
||||||
for child in family.get_child_id_list():
|
for child_id in child_list:
|
||||||
if first == 1:
|
if first == 1:
|
||||||
first = 0
|
first = 0
|
||||||
else:
|
else:
|
||||||
self.d.write_text('\n')
|
self.d.write_text('\n')
|
||||||
|
child = self.database.find_person_from_id(child_id)
|
||||||
self.d.write_text(child.get_primary_name().get_regular_name())
|
self.d.write_text(child.get_primary_name().get_regular_name())
|
||||||
self.d.end_paragraph()
|
self.d.end_paragraph()
|
||||||
self.d.end_cell()
|
self.d.end_cell()
|
||||||
@ -261,16 +275,19 @@ class IndivSummary(Report.Report):
|
|||||||
self.d.end_cell()
|
self.d.end_cell()
|
||||||
self.d.end_row()
|
self.d.end_row()
|
||||||
|
|
||||||
family = self.person.get_main_parents_family_id()
|
fam_id = self.person.get_main_parents_family_id()
|
||||||
if family:
|
if fam_id:
|
||||||
father_inst = family.get_father_id()
|
family = self.database.find_family_from_id(fam_id)
|
||||||
if father_inst:
|
father_id = family.get_father_id()
|
||||||
father = father_inst.get_primary_name().get_regular_name()
|
if father_id:
|
||||||
|
dad = self.database.find_person_from_id(father_id)
|
||||||
|
father = dad.get_primary_name().get_regular_name()
|
||||||
else:
|
else:
|
||||||
father = ""
|
father = ""
|
||||||
mother_inst = family.get_mother_id()
|
mother_id = family.get_mother_id()
|
||||||
if mother_inst:
|
if mother_id:
|
||||||
mother = mother_inst.get_primary_name().get_regular_name()
|
mom = self.database.find_person_from_id(mother_id)
|
||||||
|
mother = mom.get_primary_name().get_regular_name()
|
||||||
else:
|
else:
|
||||||
mother = ""
|
mother = ""
|
||||||
else:
|
else:
|
||||||
@ -318,10 +335,12 @@ class IndivSummary(Report.Report):
|
|||||||
self.d.end_cell()
|
self.d.end_cell()
|
||||||
self.d.end_row()
|
self.d.end_row()
|
||||||
|
|
||||||
event_list = [ self.person.get_birth(), self.person.get_death() ]
|
event_list = [ self.person.get_birth_id(), self.person.get_death_id() ]
|
||||||
event_list = event_list + self.person.get_event_list()
|
event_list = event_list + self.person.get_event_list()
|
||||||
for event in event_list:
|
for event_id in event_list:
|
||||||
self.write_fact(event)
|
if event_id:
|
||||||
|
event = self.database.find_event_from_id(event_id)
|
||||||
|
self.write_fact(event)
|
||||||
self.d.end_table()
|
self.d.end_table()
|
||||||
|
|
||||||
self.write_families()
|
self.write_families()
|
||||||
|
Loading…
Reference in New Issue
Block a user