Commit b8090d8c authored by Vincent Pelletier's avatar Vincent Pelletier

Only update the stop date if we are on "started" state (the same script is...

Only update the stop date if we are on "started" state (the same script is called to go to delivered).
Fix a stupid mistake when checking if stop_date was given.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24972 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8ebe18d2
...@@ -97,8 +97,9 @@ for movement in movement_list:\n ...@@ -97,8 +97,9 @@ for movement in movement_list:\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
debit_required = transaction.isDebitRequired()\n debit_required = transaction.isDebitRequired()\n
if debit_required:\n if debit_required:\n
if transaction.getSimulationState() == \'started\':\n
stop_date = state_change.kwargs.get(\'stop_date\')\n stop_date = state_change.kwargs.get(\'stop_date\')\n
if \'stop_date\' is None:\n if stop_date is None:\n
msg = Message(domain = "ui", message="No stop date provided")\n msg = Message(domain = "ui", message="No stop date provided")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
transaction.setStopDate(stop_date)\n transaction.setStopDate(stop_date)\n
......
415 416
\ 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