<?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 encoding="cdata"><![CDATA[

# Updates attributes of an Zope document\n
# which is in a class inheriting from ERP5 Base\n
\n
\n
from Products.Formulator.Errors import ValidationError, FormValidationError\n
from string import join\n
\n
request=context.REQUEST\n
\n
#Exceptions for UI and Sort\n
if dialog_method == \'Base_configureUI\':\n
  return context.Base_configureUI(form_id=form_id,\n
                              selection_name=selection_name,\n
                              field_columns=getattr(request,\'field_columns\'),\n
                              stat_columns=getattr(request,\'stat_columns\'))\n
if dialog_method == \'Base_configureSortOn\':\n
  return context.Base_configureSortOn(form_id=form_id,\n
                              selection_name=selection_name,\n
                              field_sort_on=getattr(request,\'field_sort_on\'),\n
                              field_sort_order=getattr(request,\'field_sort_order\'))\n
if dialog_method == \'Base_editRelation\':\n
  return context.Base_editRelation(form_id=form_id,\n
                              field_id=request.get(\'field_id\'),\n
                              selection_name=selection_name,\n
                              selection_index=request.get(\'selection_index\'),\n
                              object_uid=request.get(\'object_uid\'),\n
                              uids=request.get(\'uids\'),\n
                              listbox_uid=request.get(\'listbox_uid\'))\n
if dialog_method == \'Base_createRelation\':\n
  return context.Base_createRelation(form_id=form_id,\n
                              selection_name=selection_name,\n
                              selection_index=request.get(\'selection_index\'),\n
                              base_category=request.get(\'base_category\'),\n
                              object_uid=request.get(\'object_uid\'),\n
                              catalog_index=request.get(\'catalog_index\'),\n
                              default_module=request.get(\'default_module\'),\n
                              dialog_id=dialog_id,\n
                              portal_type=request.get(\'portal_type\'),\n
                              return_url=request.get(\'cancel_url\'))\n
if dialog_method == \'Folder_delete\':\n
  return context.Folder_delete(form_id=form_id,\n
                              field_id=request.get(\'field_id\'),\n
                              selection_name=selection_name,\n
                              selection_index=request.get(\'selection_index\'),\n
                              object_uid=request.get(\'object_uid\'),\n
                              uids=request.get(\'listbox_uid\'),\n
                              md5_object_uid_list=request.get(\'md5_object_uid_list\'),\n
                              cancel_url=request.get(\'cancel_url\'))\n
\n
try:\n
  MARKER = \'marker\'\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, MARKER)\n
    if v is not MARKER:\n
      k = k[3:]\n
      kw[k] = v\n
  url_params = []\n
  for (k,v) in kw.items():\n
    url_params += [\'%s=%s\' % (k,v)]\n
  url_params_string = join(url_params, \'&\')\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
\n
if url_params_string != \'\':\n
  redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
                            , dialog_method\n
                            , url_params_string\n
                            )\n
else:\n
  redirect_url = \'%s/%s\' % ( context.absolute_url()\n
                            , dialog_method\n
                            )\n
\n
return request.RESPONSE.redirect( redirect_url )\n


]]></string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_dav_writelocks</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_skins/local_erp5/Base_callListDialogMethod</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>form_id,cancel_url,dialog_method,selection_name,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>5</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>form_id</string>
                            <string>cancel_url</string>
                            <string>dialog_method</string>
                            <string>selection_name</string>
                            <string>dialog_id</string>
                            <string>Products.Formulator.Errors</string>
                            <string>ValidationError</string>
                            <string>FormValidationError</string>
                            <string>string</string>
                            <string>join</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>request</string>
                            <string>getattr</string>
                            <string>MARKER</string>
                            <string>form</string>
                            <string>kw</string>
                            <string>_getiter_</string>
                            <string>f</string>
                            <string>k</string>
                            <string>v</string>
                            <string>_getitem_</string>
                            <string>_write_</string>
                            <string>url_params</string>
                            <string>url_params_string</string>
                            <string>validation_errors</string>
                            <string>field_errors</string>
                            <string>redirect_url</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>Base_callListDialogMethod</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="2" aka="AAAAAAAAAAI=">
    <pickle>
      <tuple>
        <tuple>
          <string>Persistence</string>
          <string>PersistentMapping</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_container</string> </key>
            <value>
              <dictionary/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
