[Erp5-report] r23739 - /erp5/trunk/products/ERP5Type/DocumentationHelper/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 22 15:06:57 CEST 2008


Author: mayoro
Date: Mon Sep 22 15:06:52 2008
New Revision: 23739

URL: http://svn.erp5.org?rev=23739&view=rev
Log:
- using existing functions instead of attributes with getattr

Modified:
    erp5/trunk/products/ERP5Type/DocumentationHelper/BaseCategoryDocumentationHelper.py

Modified: erp5/trunk/products/ERP5Type/DocumentationHelper/BaseCategoryDocumentationHelper.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/DocumentationHelper/BaseCategoryDocumentationHelper.py?rev=23739&r1=23738&r2=23739&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/DocumentationHelper/BaseCategoryDocumentationHelper.py (original)
+++ erp5/trunk/products/ERP5Type/DocumentationHelper/BaseCategoryDocumentationHelper.py Mon Sep 22 15:06:52 2008
@@ -75,44 +75,28 @@
     """
     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):




More information about the Erp5-report mailing list