Commit 0c20308c authored by Fabien Morin's avatar Fabien Morin

fix some mistakes in sendCrendentialsByEMail workflow script and remove sender...

fix some mistakes in sendCrendentialsByEMail workflow script and remove sender because it's not required

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24277 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79719b73
...@@ -59,14 +59,17 @@ ...@@ -59,14 +59,17 @@
This script tries to send a message containing the credentials to the\n This script tries to send a message containing the credentials to the\n
organisation. It uses portal_notifications and the getObject API of ERP5Catalog.\n organisation. It uses portal_notifications and the getObject API of ERP5Catalog.\n
"""\n """\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
object = state_change[\'object\']\n object = state_change[\'object\']\n
\n \n
translateString = object.Base_translateString\n translateString = object.Base_translateString\n
portal_catalog = object.portal_catalog\n portal_catalog = object.portal_catalog\n
ninea = object.getNinea()\n
\n \n
# get the new organisation :\n # get the new organisation :\n
result = portal_catalog(portal_type=\'Organisation\',\n result = portal_catalog(portal_type=\'Organisation\',\n
vat_code=object.getNinea())\n vat_code=ninea)\n
\n \n
if len(result) > 1:\n if len(result) > 1:\n
msg = "Error : There is more than one company with the NINEA code ${code}"\n msg = "Error : There is more than one company with the NINEA code ${code}"\n
...@@ -96,9 +99,8 @@ msg = translateString(msg,\n ...@@ -96,9 +99,8 @@ msg = translateString(msg,\n
)\n )\n
\n \n
# We can now notify the owner through the notification tool\n # We can now notify the owner through the notification tool\n
object.portal_notifications.sendMessage(sender=\'no-reply\',\n object.portal_notifications.sendMessage(recipient=organisation.getReference(), \n
recipient=organisation.getReference(), subject=subject, message=msg,\n subject=subject, message=msg, portal_type_list=(\'Person\', \'Organisation\'))\n
portal_type_list=(\'Person\', \'Organisation\'))\n
]]></string> </value> ]]></string> </value>
...@@ -147,17 +149,18 @@ object.portal_notifications.sendMessage(sender=\'no-reply\',\n ...@@ -147,17 +149,18 @@ object.portal_notifications.sendMessage(sender=\'no-reply\',\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>object</string> <string>object</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>translateString</string> <string>translateString</string>
<string>portal_catalog</string> <string>portal_catalog</string>
<string>ninea</string>
<string>result</string> <string>result</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
<string>dict</string> <string>dict</string>
<string>ninea</string>
<string>ValidationFailed</string>
<string>organisation</string> <string>organisation</string>
<string>subject</string> <string>subject</string>
</tuple> </tuple>
......
2008-10-21 fabien
* fix some mistakes in sendCrendentialsByEMail workflow script and remove sender because it's not required
2008-10-20 fabien 2008-10-20 fabien
* update ERP5Site_getSecurityFromLatestWorkflowHistory to remove workflow hardcoded value * update ERP5Site_getSecurityFromLatestWorkflowHistory to remove workflow hardcoded value
* add a script generateNewLogin to generate new login (remove spaces and accents, add a number at the end if the login already exists, ...) * add a script generateNewLogin to generate new login (remove spaces and accents, add a number at the end if the login already exists, ...)
......
415 426
\ 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