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

Generate payments in confirmed state.

parent 81371a01
......@@ -51,12 +51,18 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import translateString\n
from DateTime import DateTime\n
\n
payment_transaction = context\n
\n
if payment_transaction.getStartDate() is None:\n
payment_transaction.setStartDate(DateTime())\n
\n
# initialize accounting_workflow to planned state\n
if payment_transaction.getSimulationState() == "draft":\n
payment_transaction.plan(comment=translateString("Initialised by Delivery Builder."))\n
if payment_transaction.getSimulationState() == "planned":\n
payment_transaction.confirm(comment=translateString("Initialised by Delivery Builder."))\n
\n
if payment_transaction.getCausalityState() == "draft":\n
# First set the payment transaction in the building state on the causality workflow\n
......
470
\ No newline at end of file
471
\ 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