<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <tuple>
          <string>Products.PythonScripts.PythonScript</string>
          <string>PythonScript</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Python_magic</string> </key>
            <value> <string encoding="base64">O/INCg==</string> </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>from Products.Formulator.Errors import ValidationError, FormValidationError\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
request=context.REQUEST\n
\n
try:\n
  # Validate the form\n
  form = getattr(context,dialog_id)\n
  form.validate_all_to_request(request)\n
  kw = {}\n
  for f in form.get_fields():\n
    k = f.id\n
    v = getattr(request,k,None)\n
    if v is not None:\n
      k = k[3:]\n
      kw[k] = v\n
\n
  listbox = request.get(\'listbox\')\n
  if listbox is not None:\n
    listbox_line_list = []\n
    listbox = getattr(request,\'listbox\',None)\n
    listbox_keys = listbox.keys()\n
    listbox_keys.sort()\n
    for key in listbox_keys:\n
      listbox_line = listbox[key]\n
      listbox_line[\'listbox_key\'] = key\n
      listbox_line_list.append(listbox[key])\n
    listbox_line_list = tuple(listbox_line_list)\n
    kw[\'listbox\'] = listbox_line_list\n
\n
  context.portal_workflow.doActionFor(\n
      context,\n
      kw[\'workflow_action\'],\n
      **kw)\n
\n
except FormValidationError, validation_errors:\n
  # Pack errors into the request\n
  field_errors = form.ErrorFields(validation_errors)\n
  request.set(\'field_errors\', field_errors)\n
  return form(request)\n
except ValueError, value_error:\n
  # Pack errors into the request\n
  redirect_url = \'%s/%s?%s%s\' % ( context.absolute_url(), form_id\n
                                  , \'portal_status_message=\',value_error\n
                                  )\n
\n
  context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
\n
else:\n
  # We will check if there\'s an error_message\n
  history_data = None\n
  try : \n
    history_data = context.portal_workflow.getInfoFor(ob=context.getObject(), name=\'history\')\n
  except AttributeError : \n
    pass\n
  redirect_url = None\n
  if history_data:\n
    last_history_data = history_data[-1]\n
    error_message = last_history_data.get(\'error_message\')\n
    if error_message != None and error_message != \'\':\n
      redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
                                  , \'portal_status_message=%s\' % error_message\n
                                  )\n
      pass\n
  if redirect_url is None:\n
    redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
                                  , \'portal_status_message=Status+changed.\'\n
                                  )\n
\n
  context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAgAAACQAAAAUAAAAQwAA
AHOcAwAAZAEAawAAbAEAfQMAbAIAfQQAAWQCAGsDAGwEAH0GAAF0BQB0BgBkAwCDAgB9CQB5ogF0
CAB0BgB8AQCDAgB9CwB0BQB8CwBkBACDAgB8CQCDAQABaAAAfQwAeHcAdAwAdAUAfAsAZAUAgwIA
g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dmFs
aWRhdGlvbl9lcnJvcnNzDAAAAGZpZWxkX2Vycm9yc3MKAAAAVmFsdWVFcnJvcnMLAAAAdmFsdWVf
ZXJyb3JzDAAAAHJlZGlyZWN0X3VybHMMAAAAaGlzdG9yeV9kYXRhcw4AAABBdHRyaWJ1dGVFcnJv
cnMRAAAAbGFzdF9oaXN0b3J5X2RhdGFzDQAAAGVycm9yX21lc3NhZ2UoAAAAACgAAAAAcw8AAABT
Y3JpcHQgKFB5dGhvbilzFQAAAFdvcmtmbG93X3N0YXR1c01vZGlmeQEAAABzbAAAABMBDQIPAgMC
EgEQAQYBGQAGAQ8BEgENARUBGAIVAQ0BBgESARUBDQENAAYBDwETAR0BDAEdAg8BBgEJAQsCEAIY
ARMBDgEQAhgBEwMhBAYBAwE3AQ4BBQEGAQcBEAEVARoBGAELAggBDQEsBCgBAAAAcxUAAABXb3Jr
Zmxvd19zdGF0dXNNb2RpZnkoAQAAAHMVAAAAV29ya2Zsb3dfc3RhdHVzTW9kaWZ5KAAAAAAoAAAA
AHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_skins/local_erp5/Workflow_statusModify</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>form_id, dialog_id</string> </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>2</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>form_id</string>
                            <string>dialog_id</string>
                            <string>Products.Formulator.Errors</string>
                            <string>ValidationError</string>
                            <string>FormValidationError</string>
                            <string>Products.DCWorkflow.DCWorkflow</string>
                            <string>ValidationFailed</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>request</string>
                            <string>getattr</string>
                            <string>form</string>
                            <string>kw</string>
                            <string>_getiter_</string>
                            <string>f</string>
                            <string>k</string>
                            <string>None</string>
                            <string>v</string>
                            <string>_getitem_</string>
                            <string>_write_</string>
                            <string>listbox</string>
                            <string>listbox_line_list</string>
                            <string>listbox_keys</string>
                            <string>key</string>
                            <string>listbox_line</string>
                            <string>tuple</string>
                            <string>_apply_</string>
                            <string>validation_errors</string>
                            <string>field_errors</string>
                            <string>ValueError</string>
                            <string>value_error</string>
                            <string>redirect_url</string>
                            <string>history_data</string>
                            <string>AttributeError</string>
                            <string>last_history_data</string>
                            <string>error_message</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>Workflow_statusModify</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
