Commit 3ea6eda8 authored by Vincent Pelletier's avatar Vincent Pelletier

Check that resource is defined on the Account Incident.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13517 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0fd3769e
...@@ -77,6 +77,9 @@ from Products.ERP5Type.Message import Message\n ...@@ -77,6 +77,9 @@ from Products.ERP5Type.Message import Message\n
transaction = state_change[\'object\']\n transaction = state_change[\'object\']\n
date = transaction.getStartDate()\n date = transaction.getStartDate()\n
\n \n
if transaction.getResourceValue() is None:\n
raise ValidationFailed, Message(domain="ui", message="No resource defined.")\n
\n
user_id = transaction.portal_membership.getAuthenticatedMember().getUserName()\n user_id = transaction.portal_membership.getAuthenticatedMember().getUserName()\n
site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
# context.log(\'validateVaultBalance site_list\',site_list)\n # context.log(\'validateVaultBalance site_list\',site_list)\n
...@@ -214,11 +217,11 @@ if debit:\n ...@@ -214,11 +217,11 @@ if debit:\n
<string>transaction</string> <string>transaction</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>date</string> <string>date</string>
<string>None</string>
<string>user_id</string> <string>user_id</string>
<string>context</string> <string>context</string>
<string>site_list</string> <string>site_list</string>
<string>source</string> <string>source</string>
<string>None</string>
<string>baobab_source</string> <string>baobab_source</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>site</string> <string>site</string>
......
220 221
\ 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