Commit 75c24b37 authored by Mayoro Diagne's avatar Mayoro Diagne

- using existing functions instead of attributes with getattr

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23739 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1c038a2c
......@@ -75,44 +75,28 @@ class BaseCategoryDocumentationHelper(DocumentationHelper):
"""
Returns the value of acquisition append value of the documented base category
"""
value = getattr(self.getInstance(), 'acquisition_append_value', '')
if value:
return 'True'
else:
return 'False'
return self.getInstance().getAcquisitionAppendValue() and 'True' or 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionMaskValue')
def getAcquisitionMaskValue(self):
"""
Returns the value of acquisition mask value of the documented base category
"""
value = getattr(self.getInstance(), 'acquisition_mask_value', '')
if value:
return 'True'
else:
return 'False'
return self.getInstance().getAcquisitionMaskValue() and 'True' or 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionCopyValue')
def getAcquisitionCopyValue(self):
"""
Returns the value of acquisition copy value of the documented base category
"""
value = getattr(self.getInstance(), 'acquisition_copy_value', '')
if value:
return 'True'
else:
return 'False'
return self.getInstance().getAcquisitionCopyValue() and 'True' or 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionSyncValue')
def getAcquisitionSyncValue(self):
"""
Returns the value of acquisition sync value of the documented base category
"""
value = getattr(self.getInstance(), 'acquisition_sync_value', '')
if value:
return 'True'
else:
return 'False'
return self.getInstance().getAcquisitionSyncValue() and 'True' or 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionBaseCategoryList')
def getAcquisitionBaseCategoryList(self):
......
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