Commit 9d2c1e55 authored by Romain Courteaud's avatar Romain Courteaud

Add explanation when changing document state

parent 11ca3fcb
...@@ -63,7 +63,7 @@ balance = context.portal_simulation.getInventoryAssetPrice(\n ...@@ -63,7 +63,7 @@ balance = context.portal_simulation.getInventoryAssetPrice(\n
if maximum_balance > balance:\n if maximum_balance > balance:\n
# customer reached his balance, shall be locked\n # customer reached his balance, shall be locked\n
if not locked and operation == \'lock\':\n if not locked and operation == \'lock\':\n
context.lock()\n context.lock(comment="Balance value is %s" % balance)\n
return\n return\n
\n \n
# check ongoing payments and check that date if is acceptable, if not lock\n # check ongoing payments and check that date if is acceptable, if not lock\n
...@@ -76,7 +76,7 @@ if context.portal_catalog.countResults(\n ...@@ -76,7 +76,7 @@ if context.portal_catalog.countResults(\n
})[0][0] > 0:\n })[0][0] > 0:\n
# there are ongoing old payments, shall be locked\n # there are ongoing old payments, shall be locked\n
if not locked and operation == \'lock\':\n if not locked and operation == \'lock\':\n
context.lock()\n context.lock(comment="Payment transaction not paid for more than %s days" % maximum_due_date)\n
else:\n else:\n
# there are no ongoing payments and balance is acceptable\n # there are no ongoing payments and balance is acceptable\n
if locked and operation == \'unlock\':\n if locked and operation == \'unlock\':\n
......
531 532
\ 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