fix in name object and quickview for names

svn: r16020
This commit is contained in:
Benny Malengier 2010-10-20 20:26:23 +00:00
parent a3556d839b
commit 920535e3f6
3 changed files with 3 additions and 4 deletions

View File

@ -266,7 +266,7 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, SourceBase, NoteBase,
if self.group_as:
return self.group_as
else:
return self.surname
return self.get_primary_surname().get_surname()
def set_sort_as(self, value):
"""

View File

@ -228,4 +228,3 @@ class SurnameBase(object):
conn = surn.get_connector()
if conn:
connl.append(conn)

View File

@ -54,7 +54,7 @@ class SameSurname(Rule):
def apply(self, db, person):
src = self.list[0].upper()
for name in [person.get_primary_name()] + person.get_alternate_names():
if name.surname and name.surname.upper() == src.upper():
if name.get_surname() and name.get_surname().upper() == src.upper():
return True
return False
@ -103,7 +103,7 @@ def run(database, document, person):
surname = person
rsurname = person
# display the title
sdoc.title(_("People with the surname '%s'") % surname)
sdoc.title(_("People sharing the surname '%s'") % surname)
sdoc.paragraph("")
stab.columns(_("Person"), _("Birth Date"), _("Name type"))
filter = GenericFilterFactory('Person')()