Commit d8e9ed19 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

get RuleTool and WorkflowTool from a portal to reduce _aq_dynamic calls.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35948 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ba0e0d98
......@@ -229,7 +229,7 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
a delivery,
finally, apply new rules if no rule with the same type is already applied.
"""
portal_rules = getToolByName(self, 'portal_rules')
portal_rules = getToolByName(self.getPortalObject(), 'portal_rules')
tv = getTransactionalVariable(self)
cache = tv.setdefault(TREE_DELIVERED_CACHE_KEY, {})
......
......@@ -168,7 +168,7 @@ class WorkflowMethod(Method):
# New implementation does not use any longer wrapWorkflowMethod
# but directly calls the workflow methods
wf = getToolByName(instance, 'portal_workflow', None)
wf = getToolByName(instance.getPortalObject(), 'portal_workflow', None)
if wf is None:
# XXX instance is unwrapped(no acquisition)
......
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