Commit f8a3c77c authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Eteri

Fix InternetProtocolAddress.asText

  Reimplement for follow up the migration of PropertySheets from Products to ERP5
parent e2f7f3cd
...@@ -72,8 +72,10 @@ class InternetProtocolAddress(Coordinate): ...@@ -72,8 +72,10 @@ class InternetProtocolAddress(Coordinate):
if result is None: if result is None:
if self.isDetailed(): if self.isDetailed():
tmp_list = [] tmp_list = []
for prop in PropertySheet.InternetProtocolAddress._properties: for prop in self.portal_property_sheets.\
property_id = prop['id'] InternetProtocolAddress.objectValues(
portal_type="Standard Property"):
property_id = prop.getReference()
getter_name = 'get%s' % convertToUpperCase(property_id) getter_name = 'get%s' % convertToUpperCase(property_id)
getter_method = getattr(self, getter_name) getter_method = getattr(self, getter_name)
value = getter_method('') value = getter_method('')
...@@ -115,8 +117,10 @@ network_interface:eth0""" ...@@ -115,8 +117,10 @@ network_interface:eth0"""
security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed') security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed')
def isDetailed(self): def isDetailed(self):
for prop in PropertySheet.InternetProtocolAddress._properties: for prop in self.portal_property_sheets.\
property_id = prop['id'] InternetProtocolAddress.objectValues(
portal_type="Standard Property"):
property_id = prop.getReference()
tester_name = 'has%s' % convertToUpperCase(property_id) tester_name = 'has%s' % convertToUpperCase(property_id)
tester_method = getattr(self, tester_name) tester_method = getattr(self, tester_name)
value = tester_method() value = tester_method()
......
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