Commit 5679e595 authored by Ivan Tyagov's avatar Ivan Tyagov

Add to abstract class default implementation of getTargetFormatItemList API....

Add to abstract class default implementation of getTargetFormatItemList API. This API is responsible for getting list of formats a doocument can be converted to.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36809 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54416b5c
......@@ -1263,3 +1263,17 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin,
# 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()
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