[Erp5-report] r19023 - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 4 14:31:47 CET 2008
Author: romain
Date: Mon Feb 4 14:31:47 2008
New Revision: 19023
URL: http://svn.erp5.org?rev=19023&view=rev
Log:
Add getMetadataMappingDict, in order to make metadata update more flexible.
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=19023&r1=19022&r2=19023&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Mon Feb 4 14:31:47 2008
@@ -1211,6 +1211,22 @@
"""
convertFile = WorkflowMethod(convertFile)
+ security.declareProtected(Permissions.AccessContentsInformation,
+ 'getMetadataMappingDict')
+ def getMetadataMappingDict(self):
+ """
+ Return a dict of metadata mapping used to update base metadata of the
+ document
+ """
+ try:
+ method = self._getTypeBasedMethod('getMetadataMappingDict')
+ except KeyError, AttributeError:
+ method = None
+ if method is not None:
+ return method()
+ else:
+ return {}
+
security.declareProtected(Permissions.ModifyPortalContent, 'updateBaseMetadata')
def updateBaseMetadata(self, **kw):
"""
More information about the Erp5-report
mailing list