Commit c6537f31 authored by Mayoro Diagne's avatar Mayoro Diagne

- using new class of documentation BaseCategoryDocumentationHelper for base...

- using new class of documentation BaseCategoryDocumentationHelper for base categories, using True or False for displaying boolean instead of 0 or 1

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23725 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e681326c
...@@ -75,28 +75,44 @@ class BaseCategoryDocumentationHelper(DocumentationHelper): ...@@ -75,28 +75,44 @@ class BaseCategoryDocumentationHelper(DocumentationHelper):
""" """
Returns the value of acquisition append value of the documented base category Returns the value of acquisition append value of the documented base category
""" """
return getattr(self.getInstance(), 'acquisition_append_value', '') value = getattr(self.getInstance(), 'acquisition_append_value', '')
if value:
return 'True'
else:
return 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionMaskValue') security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionMaskValue')
def getAcquisitionMaskValue(self): def getAcquisitionMaskValue(self):
""" """
Returns the value of acquisition mask value of the documented base category Returns the value of acquisition mask value of the documented base category
""" """
return getattr(self.getInstance(), 'acquisition_mask_value', '') value = getattr(self.getInstance(), 'acquisition_mask_value', '')
if value:
return 'True'
else:
return 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionCopyValue') security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionCopyValue')
def getAcquisitionCopyValue(self): def getAcquisitionCopyValue(self):
""" """
Returns the value of acquisition copy value of the documented base category Returns the value of acquisition copy value of the documented base category
""" """
return getattr(self.getInstance(), 'acquisition_copy_value', '') value = getattr(self.getInstance(), 'acquisition_copy_value', '')
if value:
return 'True'
else:
return 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionSyncValue') security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionSyncValue')
def getAcquisitionSyncValue(self): def getAcquisitionSyncValue(self):
""" """
Returns the value of acquisition sync value of the documented base category Returns the value of acquisition sync value of the documented base category
""" """
return getattr(self.getInstance(), 'acquisition_sync_value', '') value = getattr(self.getInstance(), 'acquisition_sync_value', '')
if value:
return 'True'
else:
return 'False'
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionBaseCategoryList') security.declareProtected(Permissions.AccessContentsInformation, 'getAcquisitionBaseCategoryList')
def getAcquisitionBaseCategoryList(self): def getAcquisitionBaseCategoryList(self):
......
...@@ -103,7 +103,7 @@ class BusinessTemplateDocumentationHelper(DocumentationHelper): ...@@ -103,7 +103,7 @@ class BusinessTemplateDocumentationHelper(DocumentationHelper):
DocumentationSection( DocumentationSection(
id='base_category', id='base_category',
title='Base Category', title='Base Category',
class_name='PortalTypeInstanceDocumentationHelper', class_name='BaseCategoryDocumentationHelper',
uri_list=self.getBaseCategoryURIList(), uri_list=self.getBaseCategoryURIList(),
), ),
]) ])
......
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