[Erp5-report] r36809 ivan - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 2 15:20:10 CEST 2010
Author: ivan
Date: Fri Jul 2 15:20:02 2010
New Revision: 36809
URL: http://svn.erp5.org?rev=36809&view=rev
Log:
Add to abstract class default implementation of getTargetFormatItemList API. This API is responsible for getting list of formats a doocument can be converted to.
Modified:
erp5/trunk/products/ERP5/Document/Document.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=36809&r1=36808&r2=36809&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Fri Jul 2 15:20:02 2010
@@ -1263,3 +1263,17 @@ class Document(PermanentURLMixIn, XMLObj
# but not in http://www.some.site/at
base_url = '/'.join(base_url_list[:-1])
return base_url
+
+ security.declareProtected(Permissions.AccessContentsInformation,
+ 'getTargetFormatItemList')
+ def getTargetFormatItemList(self):
+ """
+ Returns a list of acceptable formats for conversion
+ in the form of tuples (for listfield in ERP5Form)
+
+ NOTE: it is the responsability of the respecive type based script
+ to provide an extensive list of conversion formats.
+ """
+ method = self._getTypeBasedMethod('getTargetFormatItemList',
+ fallback_script_id='Base_getTargetFormatItemList')
+ return method()
More information about the Erp5-report
mailing list