Commit f2d927a8 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos_accounting: Update Invoice Date when automaticaly changing state

parent 65a4436e
......@@ -8,6 +8,9 @@ if context.getSimulationState() == 'confirmed'\
and context.getSpecialise() in [portal.portal_preferences.getPreferredAggregatedSaleTradeCondition(),
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()]:
comment = 'Stopped by alarm as all actions in confirmed state are ready.'
now = DateTime()
context.setStartDate(now)
context.setStopDate(now)
if isTransitionPossible(context, 'start'):
context.start(comment=comment)
if isTransitionPossible(context, 'stop'):
......
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