<?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>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>portal = context.getPortalObject()\n
\n
if not organisation:\n
  organisation = portal.portal_preferences\\\n
               .getPreferredAccountingTransactionSourceSection()\n
\n
if not organisation:\n
  return [(\'\', \'\')]\n
\n
organisation_value = portal.restrictedTraverse(organisation)\n
group_value = organisation_value.getGroupValue(None)\n
\n
search_kw = {\n
  \'portal_type\': portal.getPortalPaymentNodeTypeList(),\n
}\n
\n
if skip_invalidated_bank_accounts:\n
  search_kw[\'validation_state\'] = \'!=invalidated\'\n
\n
if group_value is None:\n
  search_kw[\'parent_uid\'] = organisation_value.getUid()\n
else:\n
  uid_list = []\n
  while group_value.getPortalType() != \'Base Category\':\n
    uid_list.append(group_value.getUid())\n
    group_value = group_value.getParentValue()\n
  search_kw[\'parent_strict_group_uid\'] = uid_list\n
  search_kw[\'parent_portal_type\'] = \'Organisation\'\n
\n
item_list = [(\'\', \'\')]\n
for bank in portal.portal_catalog(**search_kw):\n
  bank = bank.getObject()\n
     \n
  if bank.getReference() and bank.getTitle() \\\n
                  and bank.getReference() != bank.getTitle():\n
    item_list.append((\'%s - %s\' % ( bank.getReference(),\n
                                    bank.getTitle() or \n
                                    bank.getSourceFreeText() or\n
                                    bank.getSourceTitle()),\n
                                    bank.getRelativeUrl()))\n
  else:\n
    item_list.append(( bank.getReference() or\n
                       bank.getTitle() or \n
                       bank.getSourceFreeText() or\n
                       bank.getSourceTitle(),\n
                       bank.getRelativeUrl() ))\n
\n
return item_list\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>organisation=None, skip_invalidated_bank_accounts=0</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>organisation</string>
                            <string>skip_invalidated_bank_accounts</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>portal</string>
                            <string>organisation_value</string>
                            <string>None</string>
                            <string>group_value</string>
                            <string>search_kw</string>
                            <string>_write_</string>
                            <string>uid_list</string>
                            <string>item_list</string>
                            <string>_getiter_</string>
                            <string>_apply_</string>
                            <string>bank</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <none/>
                <int>0</int>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>AccountModule_getBankAccountItemList</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
