Commit 1aa9a702 authored by Jérome Perrin's avatar Jérome Perrin

remove country= parameter for asText. It's not part of the interface, and

anyway is not passed by getDefaultAddressText and others.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12725 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7f7d4610
...@@ -67,17 +67,13 @@ class GeographicAddress(Coordinate, Base): ...@@ -67,17 +67,13 @@ class GeographicAddress(Coordinate, Base):
__implements__ = ( Interface.Coordinate ) __implements__ = ( Interface.Coordinate )
security.declareProtected(Permissions.AccessContentsInformation, 'asText') security.declareProtected(Permissions.AccessContentsInformation, 'asText')
def asText(self, country=''): def asText(self):
""" """
Returns the address as a complete formatted string Returns the address as a complete formatted string
with street address, zip, city and region with street address, zip, city and region
""" """
result = Coordinate.asText(self) result = Coordinate.asText(self)
if result is None: if result is None:
if country=='France' or country=='france' or country=='fr' :
result = ('%s\n%s %s') % (self.getStreetAddress() or '',
self.getZipCode() or '', self.getCity() or '')
else :
result = ('%s\n%s %s') % (self.getStreetAddress() or '', result = ('%s\n%s %s') % (self.getStreetAddress() or '',
self.getCity() or '', self.getZipCode() or '') self.getCity() or '', self.getZipCode() or '')
if not result.strip(): if not result.strip():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment