Commit a26305a2 authored by Łukasz Nowak's avatar Łukasz Nowak

Pass transition only when possible.

More then one builder can be called in same time for same invoice.
parent ab0f08aa
......@@ -74,7 +74,8 @@ if invoice.getSimulationState() == \'draft\':\n
invoice.plan(comment=translateString(\'Initialised by Delivery Builder.\'), activate_kw={\'tag\': tag})\n
\n
# Update causality workflow\n
invoice.startBuilding()\n
if invoice.getPortalObject().portal_workflow.isTransitionPossible(invoice, \'start_building\'):\n
invoice.startBuilding()\n
invoice.updateCausalityState()\n
\n
# update specialise from movements\n
......
414
\ No newline at end of file
415
\ 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