[Erp5-report] r16679 - /erp5/trunk/products/ERP5/Document/Document.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 27 20:25:57 CEST 2007


Author: jerome
Date: Thu Sep 27 20:25:57 2007
New Revision: 16679

URL: http://svn.erp5.org?rev=16679&view=rev
Log:
define convertFile on the class, because other methods (convertToBaseFormat)
call it, so this would fail if no workflow define the transition.


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=16679&r1=16678&r2=16679&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Thu Sep 27 20:25:57 2007
@@ -38,7 +38,8 @@
 from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
 from Products.ERP5Type.XMLObject import XMLObject
 from Products.ERP5Type.DateUtils import convertDateToHour, number_of_hours_in_day, number_of_hours_in_year
-from Products.ERP5Type.Utils import convertToUpperCase, convertToMixedCase
+from Products.ERP5Type.Utils import convertToUpperCase
+from Products.ERP5Type.Base import WorkflowMethod
 from Products.ERP5.Document.Url import UrlMixIn
 from Products.ERP5.Tool.ContributionTool import MAX_REPEAT
 from AccessControl import Unauthorized
@@ -1177,6 +1178,12 @@
     """
     raise NotImplementedError
 
+  def convertFile(self, msg=None):
+    """
+    Workflow transition invoked when conversion occurs.
+    """
+  convertFile = WorkflowMethod(convertFile)
+
   security.declareProtected(Permissions.ModifyPortalContent, 'updateBaseMetadata')
   def updateBaseMetadata(self, **kw):
     """




More information about the Erp5-report mailing list