Commit 45396ecc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not hardcode 'Simulation Movement' in method definitions.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31195 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 009a3412
...@@ -52,6 +52,9 @@ class RuleMixin: ...@@ -52,6 +52,9 @@ class RuleMixin:
zope.interface.implements(interfaces.IRule, zope.interface.implements(interfaces.IRule,
interfaces.IMovementCollectionUpdater,) interfaces.IMovementCollectionUpdater,)
# Portal Type of created children
movement_type = 'Simulation Movement'
# Implementation of IRule # Implementation of IRule
def constructNewAppliedRule(self, context, id=None, def constructNewAppliedRule(self, context, id=None,
activate_kw=None, **kw): activate_kw=None, **kw):
...@@ -214,7 +217,7 @@ class RuleMixin: ...@@ -214,7 +217,7 @@ class RuleMixin:
for movement in movement_diff.getNewMovementList(): for movement in movement_diff.getNewMovementList():
# This case is easy, because it is an applied rule # This case is easy, because it is an applied rule
kw = movement_diff.getMovementPropertyDict(movement) kw = movement_diff.getMovementPropertyDict(movement)
movement = context.newContent(portal_type='Simulation Movement', **kw) movement = context.newContent(portal_type=self.movement_type, **kw)
# Placeholder for methods to override # Placeholder for methods to override
def _getMovementGenerator(self): def _getMovementGenerator(self):
......
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