Commit 8733a4fc authored by Łukasz Nowak's avatar Łukasz Nowak

Fix condition.

parent c0654bc7
...@@ -51,11 +51,13 @@ ...@@ -51,11 +51,13 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
if context.getPortalType() != \'Sale Packing List\' \\\n if context.getPortalType() != \'Sale Packing List\':\n
and context.getSpecialise() != portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
raise TypeError(\'Incorrect delivery.\')\n raise TypeError(\'Incorrect delivery.\')\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
if context.getSimulationState() == \'confirmed\' and len(context.checkConsistency()) == 0 and context.getCausalityState() == \'solved\':\n if context.getSimulationState() == \'confirmed\' \\\n
and len(context.checkConsistency()) == 0 \\\n
and context.getCausalityState() == \'solved\' \\\n
and context.getSpecialise() == portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
comment = \'Delivered by alarm as all actions in confirmed state are ready.\'\n comment = \'Delivered by alarm as all actions in confirmed state are ready.\'\n
if isTransitionPossible(context, \'start\'):\n if isTransitionPossible(context, \'start\'):\n
context.start(comment=comment)\n context.start(comment=comment)\n
......
...@@ -51,11 +51,13 @@ ...@@ -51,11 +51,13 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
if context.getPortalType() != \'Sale Invoice Transaction\' \\\n if context.getPortalType() != \'Sale Invoice Transaction\':\n
and context.getSpecialise() != portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
raise TypeError(\'Incorrect delivery.\')\n raise TypeError(\'Incorrect delivery.\')\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
if context.getSimulationState() == \'confirmed\' and len(context.checkConsistency()) == 0 and context.getCausalityState() == \'solved\':\n if context.getSimulationState() == \'confirmed\'\\\n
and len(context.checkConsistency()) == 0\\\n
and context.getCausalityState() == \'solved\'\\\n
and context.getSpecialise() == portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
comment = \'Stopped by alarm as all actions in confirmed state are ready.\'\n comment = \'Stopped by alarm as all actions in confirmed state are ready.\'\n
if isTransitionPossible(context, \'start\'):\n if isTransitionPossible(context, \'start\'):\n
context.start(comment=comment)\n context.start(comment=comment)\n
......
176 177
\ No newline at end of file \ No newline at end of file
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