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