[Erp5-report] r38487 fx.algrain - /experimental/bt5/erp5_credential/SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 20 15:05:56 CEST 2010
Author: fx.algrain
Date: Mon Sep 20 15:05:55 2010
New Revision: 38487
URL: http://svn.erp5.org?rev=38487&view=rev
Log:
Debug all scripts
Added:
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue.xml
Modified:
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createPersonAndAssignment.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createUser.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setDefaultDestinationDecision.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToOrganisation.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToPerson.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_updatePersonAssignment.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateOrganisationInformation.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateRelatedEntity.xml
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createPersonAndAssignment.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createPersonAndAssignment.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createPersonAndAssignment.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createPersonAndAssignment.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -60,11 +60,11 @@ if context.getCorporateName():\n
context.CredentialRequest_setDefaultDestinationDecision(related_portal_type)\n
\n
#Check consistency of the subscription\n
-context.CredentialRequest_checkConsistency(related_portal_type)\n
+context.Credential_checkConsistency(related_portal_type)\n
\n
#Fill related object with credential request\n
for portal_type in related_portal_type:\n
- geattr(context,\'CredentialRequest_setRegisteredInformationTo\' % portal_type.replace(\' \',\'\'))()\n
+ getattr(context,\'CredentialRequest_setRegisteredInformationTo%s\' % portal_type.replace(\' \',\'\'))()\n
\n
#Create assignment\n
context.CredentialRequest_updatePersonAssignment()\n
@@ -121,7 +121,7 @@ context.CredentialRequest_sendAcceptedNo
<string>context</string>
<string>_getiter_</string>
<string>portal_type</string>
- <string>geattr</string>
+ <string>getattr</string>
<string>login</string>
<string>password</string>
</tuple>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createUser.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createUser.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createUser.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_createUser.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -53,6 +53,10 @@
<value> <string>"""Just set reference and password to create a user"""\n
person = context.getDestinationDecisionValue(portal_type="Person")\n
\n
+#Create user of the person only if not exist\n
+if person.hasReference() and person.getPassword(): \n
+ return person.getReference(), None\n
+\n
#Set login\n
login = context.getReference()\n
person.setReference(login)\n
@@ -78,7 +82,7 @@ return login, password\n
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>reference,password=None</string> </value>
+ <value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
@@ -106,19 +110,18 @@ return login, password\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>2</int> </value>
+ <value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
- <string>reference</string>
- <string>password</string>
<string>_getattr_</string>
<string>context</string>
<string>person</string>
- <string>login</string>
<string>None</string>
+ <string>login</string>
+ <string>password</string>
<string>Person_generatePassword</string>
</tuple>
</value>
@@ -131,9 +134,7 @@ return login, password\n
<item>
<key> <string>func_defaults</string> </key>
<value>
- <tuple>
- <none/>
- </tuple>
+ <none/>
</value>
</item>
<item>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -50,16 +50,25 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string># send mail\n
-portal = context.getPortalObjec()\n
-credential_request = context\n
+ <value> <string>"""Send an email (after accept a credential request"""\n
+portal = context.getPortalObject()\n
+Base_translateString = context.Base_translateString\n
person = context.getDestinationDecisionValue(portal_type=\'Person\')\n
\n
subject = Base_translateString("${instance_name} account created",\n
mapping=dict(instance_name=portal.getTitle()))\n
-message = Base_translateString("\\nCongratulation, the creation of you new " \\\n
+\n
+message = ""\n
+if password:\n
+ message = Base_translateString("\\nCongratulation, the creation of you new " \\\n
+ "${instance_name} account \'${user_id}\' is finished.\\nYour password is \'${password}\'\\nThank you",\n
+ mapping=dict(instance_name=portal.getTitle(), user_id=login, password=password))\n
+\n
+else:\n
+ message = Base_translateString("\\nCongratulation, the creation of you new " \\\n
"${instance_name} account \'${user_id}\' is finished.\\n\\nThank you",\n
- mapping=dict(instance_name=portal.getTitle(), user_id=credential_request.getReference()))\n
+ mapping=dict(instance_name=portal.getTitle(), user_id=login))\n
+\n
portal.portal_notifications.sendMessage(sender=None,\n
recipient=[person,], subject=subject, message=message)\n
</string> </value>
@@ -72,7 +81,7 @@ portal.portal_notifications.sendMessage(
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string></string> </value>
+ <value> <string>login,password</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -92,18 +101,19 @@ portal.portal_notifications.sendMessage(
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>0</int> </value>
+ <value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
+ <string>login</string>
+ <string>password</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
- <string>credential_request</string>
- <string>person</string>
<string>Base_translateString</string>
+ <string>person</string>
<string>dict</string>
<string>subject</string>
<string>message</string>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setDefaultDestinationDecision.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setDefaultDestinationDecision.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setDefaultDestinationDecision.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setDefaultDestinationDecision.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -66,6 +66,7 @@ for destination in destination_list:\n
if "Organisation" in create_portal_type:\n
#Try to find existant organisation\n
organisation_title = context.getCorporateName()\n
+ module = context.getDefaultModule("Organisation") \n
organisation_list = module.searchFolder(title=organisation_title)\n
#be sure we have the same title and no %title%\n
organisation_list = [x.getObject() for x in organisation_list if x.getObject().getTitle() == organisation_title ]\n
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToOrganisation.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToOrganisation.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToOrganisation.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToOrganisation.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -66,7 +66,7 @@ context.Credential_copyRegistredInformat
\n
#Attach the organisation to the person if we have a person\n
if person:\n
- person.setCareerSubordination(organisation.getRelativeUrl())\n
+ person.setDefaultCareerSubordination(organisation.getRelativeUrl())\n
\n
#Try to validate\n
try:\n
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToPerson.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToPerson.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToPerson.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_setRegisteredInformationToPerson.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -51,10 +51,29 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""Copy subscription information to related person"""\n
+from Products.ERP5Type.Errors import UnsupportedWorkflowMethod\n
+from Products.ERP5Type.Utils import sleep\n
\n
context.Credential_checkConsistency([\'Person\'])\n
person = context.getDestinationDecisionValue(portal_type="Person")\n
\n
+#Close the current career and create new career if needed\n
+default_career = getattr(person,\'default_career\',None)\n
+if default_career is not None:\n
+ try:\n
+ default_career.stop("New credential")\n
+ default_career.setStopDate(DateTime())\n
+ person.Person_shiftDefaultCareer()\n
+ #the shift default career, do a copy past in activity\n
+ #we must wait to continue else we edit the old default career \n
+ #TODO: Use activity and after-tag to run the next code ?\n
+ while(person.hasActivity() or default_career.hasActivity()):\n
+ sleep(10)\n
+\n
+ except UnsupportedWorkflowMethod:\n
+ pass\n
+\n
+\n
# Person Mapping\n
person_mapping = (\n
# (subscription, person)\n
@@ -80,16 +99,17 @@ person_mapping = (\n
context.Credential_copyRegistredInformation(person, person_mapping)\n
\n
\n
-#try to validate\n
-\n
+#try to validate, can be get error if already validated\n
try:\n
person.validate()\n
-except:\n
+except UnsupportedWorkflowMethod:\n
pass\n
\n
+\n
try:\n
- person.getDefaultCareer().validate()\n
-except:\n
+ default_career = getattr(person,\'default_career\',None)\n
+ default_career.start()\n
+except UnsupportedWorkflowMethod, AttributeError:\n
pass\n
</string> </value>
</item>
@@ -133,10 +153,19 @@ except:\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
+ <string>Products.ERP5Type.Errors</string>
+ <string>UnsupportedWorkflowMethod</string>
+ <string>Products.ERP5Type.Utils</string>
+ <string>sleep</string>
<string>_getattr_</string>
<string>context</string>
<string>person</string>
+ <string>getattr</string>
+ <string>None</string>
+ <string>default_career</string>
+ <string>DateTime</string>
<string>person_mapping</string>
+ <string>AttributeError</string>
</tuple>
</value>
</item>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_updatePersonAssignment.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_updatePersonAssignment.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_updatePersonAssignment.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_updatePersonAssignment.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -53,6 +53,7 @@
<value> <string>"""Create an assingment for the person depending credential request configuration"""\n
\n
person = context.getDestinationDecisionValue(portal_type="Person")\n
+organisation = context.getDestinationDecisionValue(portal_type="Organisation")\n
\n
assignment_configuration = {}\n
#Look on current assignement\n
@@ -62,8 +63,8 @@ for role in context.getRoleList():\n
role = role,\n
validation_state = \'open\')\n
\n
- assignment_configuration[role] = boolean(has_assignment)\n
- close_role_list.remove(role)\n
+ assignment_configuration[role] = bool(has_assignment)\n
+ old_role_list.remove(role)\n
\n
#Close old assignement\n
context.CredentialRequest_closePersonAssignment(old_role_list)\n
@@ -140,6 +141,7 @@ for role,create_assingment in assignment
<string>_getattr_</string>
<string>context</string>
<string>person</string>
+ <string>organisation</string>
<string>assignment_configuration</string>
<string>append</string>
<string>$append0</string>
@@ -148,16 +150,14 @@ for role,create_assingment in assignment
<string>old_role_list</string>
<string>role</string>
<string>has_assignment</string>
- <string>boolean</string>
+ <string>bool</string>
<string>_write_</string>
- <string>close_role_list</string>
<string>int</string>
<string>assignment_duration</string>
<string>DateTime</string>
<string>today</string>
<string>delay</string>
<string>create_assingment</string>
- <string>organisation</string>
<string>assignment_for_website</string>
<string>current_assignment_list</string>
<string>assignment</string>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateOrganisationInformation.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateOrganisationInformation.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateOrganisationInformation.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateOrganisationInformation.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -65,7 +65,7 @@ organisation_mapping = (\n
(\'default_address_city\', \'default_address_city\'),\n
(\'default_address_region\', \'default_address_region\'),\n
(\'default_mobile_telephone_text\', \'default_mobile_telephone_text\'),\n
- (\'activity_list\', \'default_career_activity_list\'),\n
+ (\'activity_list\', \'activity_list\'),\n
)\n
\n
context.Credential_copyRegistredInformation(organisation, organisation_mapping)\n
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateRelatedEntity.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateRelatedEntity.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateRelatedEntity.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialUpdate_updateRelatedEntity.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -54,7 +54,7 @@
#Use list and getattr to do generic purpose\n
for destination_decision in context.getDestinationDecisionValueList():\n
portal_type = destination_decision.getPortalType().replace(\' \',\'\')\n
- geattr(context,\'CredentialUpdate_update%sInformation\' % portal_type)()\n
+ getattr(context,\'CredentialUpdate_update%sInformation\' % portal_type)()\n
</string> </value>
</item>
<item>
@@ -96,7 +96,7 @@ for destination_decision in context.getD
<string>context</string>
<string>destination_decision</string>
<string>portal_type</string>
- <string>geattr</string>
+ <string>getattr</string>
</tuple>
</value>
</item>
Added: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue.xml?rev=38487&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue.xml (added)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
+if person is not None and property_name is not None:\n
+ organisation = person.getDefaultCareerSubordinationValue()\n
+ if organisation is not None:\n
+ return organisation.getProperty(property_name, None)\n
+return None\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>property_name=None</string> </value>
+ </item>
+ <item>
+ <key> <string>_proxy_roles</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>property_name</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>person</string>
+ <string>None</string>
+ <string>organisation</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple>
+ <none/>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ERP5Site_getPropertyFromAuthenticatedMemberSubordinationValue</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml?rev=38487&r1=38486&r2=38487&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialRequest.xml [utf8] Mon Sep 20 15:05:55 2010
@@ -52,13 +52,13 @@
<key> <string>_body</string> </key>
<value> <string>"""Call by dialog to create a new credential request and redirect to the context\n
Paramameter list :\n
-dialog_id -- id of dialog calling the script"""\n
+reference -- User login is mandatory (String)\n
+default_email_text -- Email is mandatory (String)"""\n
# create the credential request\n
module = context.getDefaultModule(portal_type=\'Credential Request\')\n
credential_request = module.newContent(\n
-\t\tportal_type="Credential Request")\n
-\n
-credential_request.edit(first_name=first_name,\n
+\t\tportal_type="Credential Request",\n
+ first_name=first_name,\n
last_name=last_name,\n
reference=reference,\n
password=password,\n
@@ -66,13 +66,23 @@ credential_request.edit(first_name=first
default_credential_question_question_free_text=default_credential_question_question_free_text,\n
default_credential_question_answer=default_credential_question_answer,\n
default_email_text=default_email_text,\n
+ default_telephone_text=default_telephone_text,\n
+ default_mobile_telephone_text=default_mobile_telephone_text,\n
+ default_fax_text=default_fax_text,\n
+ default_address_street_address=default_address_street_address,\n
+ default_address_city=default_address_city,\n
+ default_address_zip_code=default_address_zip_code,\n
+ default_address_region=default_address_region,\n
role_list=role_list,\n
function=function,\n
site=site,\n
- activity_list=activity_list)\n
+ activity_list=activity_list,\n
+ corporate_name=corporate_name,\n
+ birthday=birthday)\n
+\n
credential_request.submit()\n
portal_status_message = context.Base_translateString("Credential Request Created.")\n
-return context.Base_redirect(\'login_form\', keep_items = dict(portal_status_message=portal_status_message ))\n
+return context.Base_redirect(dialog_id, keep_items = dict(portal_status_message=portal_status_message ))\n
</string> </value>
</item>
<item>
@@ -83,14 +93,12 @@ return context.Base_redirect(\'login_for
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>first_name=None, last_name=None, reference=None, password=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, default_email_text=None, role_list=None, function=None, site=None, activity_list=None, **kw</string> </value>
+ <value> <string>reference, default_email_text, last_name=None, password=None, birthday=None, default_telephone_text=None, default_mobile_telephone_text=None, default_fax_text=None, corporate_name=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, role_list=None, function=None, site=None, activity_list=None, default_address_city=None, default_address_street_address=None, default_address_zip_code=None,default_address_region=None, dialog_id=\'\', **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
- <tuple>
- <string>Manager</string>
- </tuple>
+ <tuple/>
</value>
</item>
<item>
@@ -111,28 +119,38 @@ return context.Base_redirect(\'login_for
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>12</int> </value>
+ <value> <int>21</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
- <string>first_name</string>
- <string>last_name</string>
<string>reference</string>
+ <string>default_email_text</string>
+ <string>last_name</string>
<string>password</string>
+ <string>birthday</string>
+ <string>default_telephone_text</string>
+ <string>default_mobile_telephone_text</string>
+ <string>default_fax_text</string>
+ <string>corporate_name</string>
<string>default_credential_question_question</string>
<string>default_credential_question_question_free_text</string>
<string>default_credential_question_answer</string>
- <string>default_email_text</string>
<string>role_list</string>
<string>function</string>
<string>site</string>
<string>activity_list</string>
+ <string>default_address_city</string>
+ <string>default_address_street_address</string>
+ <string>default_address_zip_code</string>
+ <string>default_address_region</string>
+ <string>dialog_id</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>module</string>
+ <string>first_name</string>
<string>credential_request</string>
<string>portal_status_message</string>
<string>dict</string>
@@ -160,6 +178,13 @@ return context.Base_redirect(\'login_for
<none/>
<none/>
<none/>
+ <none/>
+ <none/>
+ <none/>
+ <none/>
+ <none/>
+ <none/>
+ <string></string>
</tuple>
</value>
</item>
More information about the Erp5-report
mailing list