Commit 54ddc7b1 authored by Jérome Perrin's avatar Jérome Perrin

define convertFile on the class, because other methods (convertToBaseFormat)

call it, so this would fail if no workflow define the transition.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16679 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d2fd9703
...@@ -38,7 +38,8 @@ from Products.CMFCore.utils import getToolByName, _checkPermission ...@@ -38,7 +38,8 @@ from Products.CMFCore.utils import getToolByName, _checkPermission
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.XMLObject import XMLObject 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.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.Document.Url import UrlMixIn
from Products.ERP5.Tool.ContributionTool import MAX_REPEAT from Products.ERP5.Tool.ContributionTool import MAX_REPEAT
from AccessControl import Unauthorized from AccessControl import Unauthorized
...@@ -1177,6 +1178,12 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -1177,6 +1178,12 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
""" """
raise NotImplementedError raise NotImplementedError
def convertFile(self, msg=None):
"""
Workflow transition invoked when conversion occurs.
"""
convertFile = WorkflowMethod(convertFile)
security.declareProtected(Permissions.ModifyPortalContent, 'updateBaseMetadata') security.declareProtected(Permissions.ModifyPortalContent, 'updateBaseMetadata')
def updateBaseMetadata(self, **kw): def updateBaseMetadata(self, **kw):
""" """
......
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