Commit 1b7f59e1 authored by iv's avatar iv

ERP5Workflow: override getattr on workflow to be able to

call scripts by their old name
parent 4bcaf09e
...@@ -93,6 +93,12 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -93,6 +93,12 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
PropertySheet.Workflow, PropertySheet.Workflow,
) )
def __getattr__(self, name):
script = self._getOb("script_" + name, None)
if script:
return script
return super(Workflow, self).__getattr__(name)
def notifyCreated(self, document): def notifyCreated(self, document):
"""Notifies this workflow after an object has been created and added. """Notifies this workflow after an object has been created and added.
......
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