Commit fc2e7f50 authored by Aurel's avatar Aurel

add missing variables and missing verification in workflow transition and fast input

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24492 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7c33ae7
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
\n \n
\n \n
container_portal_type_list = ["Monetary Reception",]\n container_portal_type_list = ["Monetary Reception",]\n
resource_translated_title_dict = {}\n
base_price_dict = {}\n base_price_dict = {}\n
\n \n
if listbox is None:\n if listbox is None:\n
...@@ -101,7 +102,6 @@ if listbox is None:\n ...@@ -101,7 +102,6 @@ if listbox is None:\n
container_dict = {}\n container_dict = {}\n
container_lines = cash_container.searchFolder(portal_type=\'Container Line\')\n container_lines = cash_container.searchFolder(portal_type=\'Container Line\')\n
if len(container_lines) == 0:\n if len(container_lines) == 0:\n
context.log("CashMovementNewNotEmitted_generateCashContainerInputDialog", "No container line finf for cash container %s" %(cash_container.getRelativeUrl(),))\n
continue\n continue\n
container_line = container_lines[0].getObject()\n container_line = container_lines[0].getObject()\n
container_dict[\'reference\'] = cash_container.getReference()\n container_dict[\'reference\'] = cash_container.getReference()\n
...@@ -202,6 +202,7 @@ if listbox is None:\n ...@@ -202,6 +202,7 @@ if listbox is None:\n
<string>kw</string> <string>kw</string>
<string>DateTime</string> <string>DateTime</string>
<string>container_portal_type_list</string> <string>container_portal_type_list</string>
<string>resource_translated_title_dict</string>
<string>base_price_dict</string> <string>base_price_dict</string>
<string>None</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -222,7 +223,6 @@ if listbox is None:\n ...@@ -222,7 +223,6 @@ if listbox is None:\n
<string>_write_</string> <string>_write_</string>
<string>resource</string> <string>resource</string>
<string>base_price</string> <string>base_price</string>
<string>resource_translated_title_dict</string>
<string>resource_translated_title</string> <string>resource_translated_title</string>
<string>quantity</string> <string>quantity</string>
<string>total_price_dict</string> <string>total_price_dict</string>
......
...@@ -71,19 +71,15 @@ source = context.getSource()\n ...@@ -71,19 +71,15 @@ source = context.getSource()\n
currency = context.Baobab_getPortalReferenceCurrencyID()\n currency = context.Baobab_getPortalReferenceCurrencyID()\n
source_section = context.getSourceSection()\n source_section = context.getSourceSection()\n
\n \n
\n if source is None:\n
# We must not force another site, it is optionnal\n redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
# So I (Seb) remove this\n , \'view\'\n
#if source_section is None :\n , \'portal_status_message=Please+select+a+source.\'\n
# redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n )\n
# , \'view\'\n return request.RESPONSE.redirect( redirect_url )\n
# , \'portal_status_message=Please+select+a+site.\'\n
# )\n
# return request.RESPONSE.redirect( redirect_url )\n
\n
\n \n
\n \n
if \'serre\' in context.getSource():\n if \'serre\' in source:\n
cash_status = [\'retired\',\'error\']\n cash_status = [\'retired\',\'error\']\n
else:\n else:\n
cash_status = [\'cancelled\',\'mutilated\', \'maculated\',\'error\']\n cash_status = [\'cancelled\',\'mutilated\', \'maculated\',\'error\']\n
...@@ -166,8 +162,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n ...@@ -166,8 +162,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n
<string>source</string> <string>source</string>
<string>currency</string> <string>currency</string>
<string>source_section</string> <string>source_section</string>
<string>cash_status</string>
<string>None</string> <string>None</string>
<string>redirect_url</string>
<string>cash_status</string>
<string>emission_letter</string> <string>emission_letter</string>
<string>list</string> <string>list</string>
<string>_getitem_</string> <string>_getitem_</string>
......
...@@ -75,6 +75,10 @@ date = transaction.getStartDate()\n ...@@ -75,6 +75,10 @@ date = transaction.getStartDate()\n
vault = transaction.getSource()\n vault = transaction.getSource()\n
vaultDestination = transaction.getDestination()\n vaultDestination = transaction.getDestination()\n
\n \n
if vault is None or vaultDestination is None:\n
msg = Message(domain="ui", message="You must define vaults.")\n
raise ValidationFailed, (msg,)\n
\n
# use of the constraint : Test source and destination\n # use of the constraint : Test source and destination\n
vliste = transaction.checkConsistency()\n vliste = transaction.checkConsistency()\n
transaction.log(\'vliste\', vliste)\n transaction.log(\'vliste\', vliste)\n
...@@ -161,9 +165,10 @@ elif resource <> 0 :\n ...@@ -161,9 +165,10 @@ elif resource <> 0 :\n
<string>date</string> <string>date</string>
<string>vault</string> <string>vault</string>
<string>vaultDestination</string> <string>vaultDestination</string>
<string>None</string>
<string>msg</string>
<string>vliste</string> <string>vliste</string>
<string>len</string> <string>len</string>
<string>msg</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
......
641 642
\ 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