Commit 1e2a4373 authored by Łukasz Nowak's avatar Łukasz Nowak

Set start date.

It is required by accounting_workflow scripts.
parent 217ff0dd
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
the new Invoice.\n the new Invoice.\n
"""\n """\n
from Products.ERP5Type.Message import translateString\n from Products.ERP5Type.Message import translateString\n
\n from DateTime import DateTime\n
if related_simulation_movement_path_list is None:\n if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n \n
...@@ -65,6 +65,9 @@ if not invoice.Invoice_isAdvanced():\n ...@@ -65,6 +65,9 @@ if not invoice.Invoice_isAdvanced():\n
if not invoice.getResource():\n if not invoice.getResource():\n
invoice.setResource(invoice.getPriceCurrency())\n invoice.setResource(invoice.getPriceCurrency())\n
\n \n
if invoice.getStartDate() is None:\n
invoice.setStartDate(DateTime())\n
\n
# initialize accounting_workflow to planned state\n # initialize accounting_workflow to planned state\n
plan_tag = \'%s_plan\' % invoice.getPath()\n plan_tag = \'%s_plan\' % invoice.getPath()\n
if invoice.getSimulationState() == \'draft\':\n if invoice.getSimulationState() == \'draft\':\n
......
345 346
\ 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