[Erp5-report] r22953 - /erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_work...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 8 16:09:16 CEST 2008


Author: thibaut
Date: Fri Aug  8 16:09:15 2008
New Revision: 22953

URL: http://svn.erp5.org?rev=22953&view=rev
Log:
thibaut
rename the script and fix typo

Removed:
    erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/liquiderOrganisationFromM4.xml

Removed: erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/liquiderOrganisationFromM4.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/liquiderOrganisationFromM4.xml?rev=22952&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/liquiderOrganisationFromM4.xml (original)
+++ erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/liquiderOrganisationFromM4.xml (removed)
@@ -1,217 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Python_magic</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>__ac_local_roles__</string> </key>
-            <value>
-              <none/>
-            </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>"""\n
-This script collects properties in the M4\n
-request_eform and use them to either stop activities for the organisation or liquidate it.\n
-"""\n
-portal = context.getPortalObject()\n
-organisation_module = portal.organisation_module\n
-request_eform = state_change[\'object\']\n
-rccm = request_eform.getCorporateRegistrationCode()\n
-application_date = request_eform.getDate()\n
-organisation_list = [org.getObject() for org in organisation_module.searchFolder(corporate_registration_code=rccm)]\n
-# Look for organisation and then decide it to stop its activities or to liquidate it\n
-for organisation in organisation_list:\n
-  if request_eform.getLiquidationCheck():\n
-    organisation.mettreEntrepriseEnCessation()\n
-    organisation.liquiderEntreprise()\n
-    organisation.radierEntreprise()\n
-  elif request_eform.getTotalSuspensionofActivities():\n
-    organisation.edit(stop_date=request_eform.getStartingDate())\n
-    organisation.stopActivities()\n
-\n
-def attachLocationYearInfo(last_id):\n
-  location_info = request_eform.getSite().split(\'/\')[0]\n
-  if location_info == \'dakar\':\n
-    location_initials = \'DKR\'\n
-  elif location_info == \'Thies\':\n
-    location_initials = \'TH\'\n
-  elif location_info == \'Saint-Louis\':\n
-    location_initials = \'SL\'\n
-  year = str(application_date.year())\n
-  type_of_form = \'M\'\n
-  attach_info = \'SN\' + location_initials + year + type_of_form\n
-  last_corporate_registration_code = str(str(last_id).split(\'-\').pop())\n
-  new_corporate_registration_code  = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n
-  return (\'-\'.join([\'SN\', location_initials, year,\n
-    type_of_form,new_corporate_registration_code]))\n
-\n
-# We shall now allocate a new registry number\n
-# using custom method attachLocationYearInfo\n
-# we use corporate_registry for corporations and\n
-# merchant_registry for merchants.\n
-# the id_group is extended with the group path so that\n
-# each local registry has a different sequence\n
-\n
-new_registry_number = request_eform.portal_ids.generateNewId(\n
-        id_group=\'sn-%s\' % request_eform.getGroup(), method=attachLocationYearInfo)\n
-\n
-# Update the registration date of the request_eform with the time when the registry officer\n
-# validates the transition\n
-request_eform.edit(registration_number=new_registry_number)\n
-history_list = context.portal_workflow.getInfoFor(request_eform, \'history\', wf_id=\'egov_form_validation_workflow\')\n
-for history in history_list:\n
-  if history[\'action\'] == \'validate_action\':\n
-    request_eform.edit(registration_date=history[\'time\'])\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_filepath</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>state_change</string> </value>
-        </item>
-        <item>
-            <key> <string>_proxy_roles</string> </key>
-            <value>
-              <tuple>
-                <string>Manager</string>
-              </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>state_change</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>portal</string>
-                            <string>organisation_module</string>
-                            <string>_getitem_</string>
-                            <string>request_eform</string>
-                            <string>rccm</string>
-                            <string>application_date</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>_getiter_</string>
-                            <string>org</string>
-                            <string>organisation_list</string>
-                            <string>organisation</string>
-                            <string>attachLocationYearInfo</string>
-                            <string>new_registry_number</string>
-                            <string>history_list</string>
-                            <string>history</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>liquiderOrganisationFromM4</string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>




More information about the Erp5-report mailing list