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

Plan only when needed.

parent 6e38c5c3
......@@ -48,4 +48,5 @@ def VifibSaleInvoiceBuilder_buildAndPlan(self, movement_list):
wf = self.getPortalObject().portal_workflow.accounting_workflow
plan_tdef = wf.transitions.get("plan")
for delivery in delivery_list:
wf._changeStateOf(delivery, plan_tdef, dict(comment="Generated by the upgrade"))
if delivery.getSimulationState() == 'draft':
wf._changeStateOf(delivery, plan_tdef, dict(comment="Generated by the upgrade"))
58
\ No newline at end of file
59
\ 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