<?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># Updates attributes of an Zope document\n
# which is in a class inheriting from ERP5 Base\n
\n
\n
from ZTUtils import make_query\n
\n
request=context.REQUEST\n
\n
#return request\n
\n
\n
#selection = context.portal_selections.getSelectionFor(\'modele_view\')\n
#context.portal_selections.setSelectionFor(\'jump_relation\',selection)\n
#return "ok"\n
\n
form = getattr(context,form_id)\n
field = form.get_field(field_id)\n
base_category = field.get_value(\'base_category\')\n
portal_type = map(lambda x:x[0],field.get_value(\'portal_type\'))\n
jump_reference_list = context.getAcquiredValueList(base_category, portal_type=portal_type)\n
if len(jump_reference_list)==1:\n
  jump_reference = jump_reference_list[0]\n
  return request[ \'RESPONSE\' ].redirect( \'%s/view\' % jump_reference.absolute_url() )\n
else:\n
  selection_uid_list = map(lambda x:x.getUid(),jump_reference_list)\n
  kw = {\'uid\': selection_uid_list}\n
  context.portal_selections.setSelectionParamsFor(\'Base_jumpToRelatedObjectList\',kw)\n
  request.set(\'object_uid\', context.getUid())\n
  request.set(\'uids\', selection_uid_list)\n
  return context.Base_jumpToRelatedObjectList(uids=selection_uid_list, REQUEST=request)\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value> <string encoding="base64">YwAAAAAAAAAAAwAAAEAAAABzEwAAAGQBAGQCAGQDAIQCAFoAAGQAAFMoBAAAAE5pAAAAAHMAAAAA
YwQAAAAVAAAACgAAAEMAAABzewEAAGQBAGsAAGwBAH0FAAF0AgB0AwBkAgCDAgB9CAB0BQB0AwB8
AACDAgB9CgB0AgB8CgBkAwCDAgB8AQCDAQB9CwB0AgB8CwBkBACDAgBkBQCDAQB9DAB0CwBkBgCE
AAB0AgB8CwBkBACDAgBkBwCDAQCDAgB9DgB0AgB0AwBkCACDAgB8DABkBwB8DgCDAQF9DwB0DgB8
DwCDAQBkCQBqAgBvPwABdA8AfA8AZAoAgwIAfRIAdAIAdA8AfAgAZAsAgwIAZAwAgwIAZA0AdAIA
fBIAZA4AgwIAgwAAFoMBAFNulQABdAsAZA8AhAAAfA8AgwIAfRMAaAAABGQQAHwTAAM8fRQAdAIA
dAIAdAMAZBEAgwIAZBIAgwIAZBMAfBQAgwIAAXQCAHwIAGQUAIMCAGQVAHQCAHQDAGQWAIMCAIMA
AIMCAAF0AgB8CABkFACDAgBkFwB8EwCDAgABdAIAdAMAZBMAgwIAZBcAfBMAZAIAfAgAgwACU2QA
AFMoGAAAAE4oAQAAAHMKAAAAbWFrZV9xdWVyeXMHAAAAUkVRVUVTVHMJAAAAZ2V0X2ZpZWxkcwkA
AABnZXRfdmFsdWVzDQAAAGJhc2VfY2F0ZWdvcnljAQAAAAIAAAADAAAAQwAAAH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pZF9saXN0cwIAAABrdygVAAAAcwcAAABmb3Jt
X2lkcwgAAABmaWVsZF9pZHMPAAAAc2VsZWN0aW9uX2luZGV4cw4AAABzZWxlY3Rpb25fbmFtZXMH
AAAAWlRVdGlsc3MKAAAAbWFrZV9xdWVyeXMJAAAAX2dldGF0dHJfcwcAAABjb250ZXh0cwcAAABy
ZXF1ZXN0cwcAAABnZXRhdHRycwQAAABmb3JtcwUAAABmaWVsZHMNAAAAYmFzZV9jYXRlZ29yeXMD
AAAAbWFwcwsAAABwb3J0YWxfdHlwZXMTAAAAanVtcF9yZWZlcmVuY2VfbGlzdHMDAAAAbGVucwkA
AABfZ2V0aXRlbV9zDgAAAGp1bXBfcmVmZXJlbmNlcxIAAABzZWxlY3Rpb25fdWlkX2xpc3RzAgAA
AGt3KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24pcxoAAABCYXNlX2p1bXBUb1JlbGF0ZWRE
b2N1bWVudAEAAABzIAAAAAAEDQIPCQ8BFQEVASEBGwETAQ8BMAISARUBHAEiARMBKAEAAABzGgAA
AEJhc2VfanVtcFRvUmVsYXRlZERvY3VtZW50KAEAAABzGgAAAEJhc2VfanVtcFRvUmVsYXRlZERv
Y3VtZW50KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAA
AA==</string> </value>
        </item>
        <item>
            <key> <string>_filepath</string> </key>
            <value> <string>Script (Python):/nexedi/portal_skins/local_erp5/Base_jumpToRelatedDocument</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>form_id, field_id, selection_index=0, selection_name=\'\'</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>4</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>form_id</string>
                            <string>field_id</string>
                            <string>selection_index</string>
                            <string>selection_name</string>
                            <string>ZTUtils</string>
                            <string>make_query</string>
                            <string>_getattr_</string>
<string>context</string>
                            <string>request</string>
                            <string>getattr</string>
                            <string>form</string>
                            <string>field</string>
                            <string>base_category</string>
                            <string>map</string>
                            <string>portal_type</string>
                            <string>jump_reference_list</string>
                            <string>len</string>
                            <string>_getitem_</string>
                            <string>jump_reference</string>
                            <string>selection_uid_list</string>
                            <string>kw</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <int>0</int>
                <string></string>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Base_jumpToRelatedDocument</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
