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

from Products.PythonScripts.standard import Object\n
from ZTUtils import LazyFilter\n
\n
request = container.REQUEST\n
portal = context.getPortalObject()\n
getInventoryList = portal.portal_simulation.getInventoryList\n
getInventory = portal.portal_simulation.getInventoryAssetPrice\n
N_ = portal.Base_translateString\n
\n
inventory_movement_type_list = portal.getPortalInventoryMovementTypeList()\n
# Balance Movement Type list is all movements that are both inventory movement\n
# and accounting movement\n
balance_movement_type_list = [ t for t in\n
                               portal.getPortalAccountingMovementTypeList()\n
                               if t in inventory_movement_type_list ]\n
\n
accounting_movement_type_list = [ t for t in\n
                                  portal.getPortalAccountingMovementTypeList()\n
                                  if t not in balance_movement_type_list ]\n
\n
inventory_params = dict(section_uid=section_uid,\n
                        simulation_state=simulation_state,\n
                        precision=precision,\n
                        group_by_resource=0)\n
if node_uid:\n
  inventory_params[\'node_uid\'] = node_uid\n
\n
MARKER = Object()\n
\n
# a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n
#                        -> dict(debit=, credit=)\n
line_per_account = {}\n
# a dictionnary node_relative_url -> boolean "do we have transactions for this\n
# account ?"\n
account_used = {}\n
\n
account_type_to_group_by_node = [\n
                  \'account_type/asset\',\n
                  \'account_type/asset/cash\',\n
                  \'account_type/asset/receivable/refundable_vat\',\n
                  \'account_type/liability/payable/collected_vat\',\n
                  \'account_type/equity\',\n
                  \'account_type/liability\',]\n
\n
profit_and_loss_account_type = [\n
                  \'account_type/expense\',\n
                  \'account_type/income\',]\n
\n
account_type_to_group_by_payment = [ \'account_type/asset/cash/bank\' ]\n
\n
if expand_accounts:\n
  account_type_to_group_by_mirror_section = [\n
                  \'account_type/asset/receivable\',\n
                  \'account_type/liability/payable\', ]\n
else:\n
  account_type_to_group_by_node.extend([\n
                  \'account_type/asset/receivable\',\n
                  \'account_type/liability/payable\' ])\n
  account_type_to_group_by_mirror_section = []\n
\n
total_debit = 0\n
total_credit = 0\n
total_initial_debit_balance = 0\n
total_initial_credit_balance = 0\n
total_final_balance_if_debit = 0\n
total_final_balance_if_credit = 0\n
\n
# standards accounts {{{\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_output=1,\n
                from_date=from_date,\n
                at_date=at_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_used[node[\'node_relative_url\']] = 1\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'debit\'] = node[\'total_price\']\n
  total_debit += round(node[\'total_price\'], precision)\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_input=1,\n
                from_date=from_date,\n
                at_date=at_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_used[node[\'node_relative_url\']] = 1\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'credit\'] = - node[\'total_price\']\n
  total_credit -= round(node[\'total_price\'], precision)\n
# }}}\n
\n
### profit & loss accounts {{{\n
for node in getInventoryList(\n
                node_category_strict_membership=profit_and_loss_account_type,\n
                from_date=max(period_start_date, from_date),\n
                group_by_node=1,\n
                omit_output=1,\n
                at_date=at_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_used[node[\'node_relative_url\']] = 1\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'debit\'] = node[\'total_price\']\n
  total_debit += round(node[\'total_price\'], precision)\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=profit_and_loss_account_type,\n
                from_date=max(period_start_date, from_date),\n
                group_by_node=1,\n
                omit_input=1,\n
                at_date=at_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_used[node[\'node_relative_url\']] = 1\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'credit\'] = - node[\'total_price\'] or 0\n
  total_credit -= round(node[\'total_price\'], precision)\n
# }}}\n
\n
# payable / receivable accounts {{{\n
if account_type_to_group_by_mirror_section:\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  from_date=from_date,\n
                  at_date=at_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'debit\'] = node[\'total_price\']\n
    total_debit += round(node[\'total_price\'], precision)\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  from_date=from_date,\n
                  at_date=at_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'credit\'] = - node[\'total_price\']\n
    total_credit -= round(node[\'total_price\'], precision)\n
# }}}\n
\n
# bank accounts {{{\n
if account_type_to_group_by_payment:\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  from_date=from_date,\n
                  at_date=at_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'debit\'] = node[\'total_price\']\n
    total_debit += round(node[\'total_price\'], precision)\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  from_date=from_date,\n
                  at_date=at_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'credit\'] = - node[\'total_price\']\n
    total_credit -= round(node[\'total_price\'], precision)\n
  # }}}\n
\n
\n
traverse = context.getPortalObject().restrictedTraverse\n
getObject = context.getPortalObject().portal_catalog.getObject\n
\n
node_title_and_id_cache = {}\n
def getNodeTitleAndId(node_relative_url):\n
  try:\n
    return node_title_and_id_cache[node_relative_url]\n
  except KeyError:\n
    node = traverse(node_relative_url)\n
    return node_title_and_id_cache.setdefault(node_relative_url,\n
                  ( node.getUid(),\n
                    node.getTitle(),\n
                    node.Account_getGapId(),\n
                    node.getProperty(\'string_index\') ))\n
\n
# include all accounts, even those not selected before (no movements in the\n
# period)\n
for node in LazyFilter(context.account_module.contentValues(), skip=\'\'):\n
  if node.getRelativeUrl() not in account_used:\n
    line_per_account.setdefault((node.getRelativeUrl(), MARKER, MARKER),\n
                              dict(debit=0, credit=0))\n
\n
initial_balance_date = (from_date - 1).latestTime()\n
\n
# Initial Balance\n
\n
# standards accounts {{{\n
# Balance Transaction\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_output=1,\n
                at_date=from_date + 1,\n
                portal_type=balance_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_debit_balance\'] = account_props.get(\n
                    \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_input=1,\n
                at_date=from_date + 1,\n
                portal_type=balance_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_credit_balance\'] = account_props.get(\n
                    \'initial_credit_balance\', 0) - node[\'total_price\']\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_output=1,\n
                at_date=initial_balance_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_debit_balance\'] = account_props.get(\n
                    \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=account_type_to_group_by_node,\n
                group_by_node=1,\n
                omit_input=1,\n
                at_date=initial_balance_date,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_credit_balance\'] = account_props.get(\n
                    \'initial_credit_balance\', 0) - node[\'total_price\']\n
# }}}\n
\n
### profit & loss accounts {{{\n
for node in getInventoryList(\n
                node_category_strict_membership=profit_and_loss_account_type,\n
                omit_output=1,\n
                from_date=min(period_start_date,\n
                              initial_balance_date),\n
                at_date=initial_balance_date,\n
                group_by_node=1,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_debit_balance\'] = account_props.get(\n
                    \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
for node in getInventoryList(\n
                node_category_strict_membership=profit_and_loss_account_type,\n
                omit_input=1,\n
                from_date=min(period_start_date,\n
                              initial_balance_date),\n
                at_date=initial_balance_date,\n
                group_by_node=1,\n
                portal_type=accounting_movement_type_list,\n
                **inventory_params):\n
  account_props = line_per_account.setdefault(\n
                          (node[\'node_relative_url\'], MARKER, MARKER),\n
                          dict(debit=0, credit=0))\n
  account_props[\'initial_credit_balance\'] = account_props.get(\n
                    \'initial_credit_balance\', 0) - node[\'total_price\']\n
# }}}\n
\n
# payable / receivable accounts {{{\n
if account_type_to_group_by_mirror_section:\n
  # Balance\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  at_date=from_date + 1,\n
                  portal_type=balance_movement_type_list,\n
                  **inventory_params):\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'initial_debit_balance\'] = account_props.get(\n
                      \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  at_date=from_date + 1,\n
                  portal_type=balance_movement_type_list,\n
                  **inventory_params):\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'initial_credit_balance\'] = account_props.get(\n
                      \'initial_credit_balance\', 0) - node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  at_date=initial_balance_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'initial_debit_balance\'] = account_props.get(\n
                      \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_mirror_section,\n
                  group_by_mirror_section=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  at_date=initial_balance_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_props = line_per_account.setdefault(\n
            (node[\'node_relative_url\'], node[\'mirror_section_uid\'], MARKER),\n
            dict(debit=0, credit=0))\n
    account_props[\'initial_credit_balance\'] = account_props.get(\n
                      \'initial_credit_balance\', 0) - node[\'total_price\']\n
# }}}\n
\n
# bank accounts {{{\n
if account_type_to_group_by_payment:\n
  # Balance\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  at_date=from_date + 1,\n
                  portal_type=balance_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'initial_debit_balance\'] = account_props.get(\n
                      \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  at_date=from_date + 1,\n
                  portal_type=balance_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'initial_credit_balance\'] = account_props.get(\n
                      \'initial_credit_balance\', 0) - node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_output=1,\n
                  at_date=initial_balance_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'initial_debit_balance\'] = account_props.get(\n
                      \'initial_debit_balance\', 0) + node[\'total_price\']\n
\n
  for node in getInventoryList(\n
                  node_category_strict_membership=\n
                          account_type_to_group_by_payment,\n
                  group_by_payment=1,\n
                  group_by_node=1,\n
                  omit_input=1,\n
                  at_date=initial_balance_date,\n
                  portal_type=accounting_movement_type_list,\n
                  **inventory_params):\n
    account_used[node[\'node_relative_url\']] = 1\n
    account_props = line_per_account.setdefault(\n
                  (node[\'node_relative_url\'], MARKER, node[\'payment_uid\']),\n
                  dict(debit=0, credit=0))\n
    account_props[\'initial_credit_balance\'] = account_props.get(\n
                      \'initial_credit_balance\', 0) - node[\'total_price\']\n
  # }}}\n
\n
line_list = []\n
for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n
                                    line_per_account.items():\n
  node_uid, node_title, node_id, string_index = getNodeTitleAndId(node_relative_url)\n
  if mirror_section_uid is not MARKER:\n
    if mirror_section_uid is None:\n
      node_title = \'%s (%s)\' % ( node_title, N_(\'None\'))\n
    else:\n
      third_party = getObject(mirror_section_uid)\n
      node_title = "%s (%s)" % ( node_title, third_party.getTitle() )\n
  elif payment_uid is not MARKER:\n
    if payment_uid is None:\n
      node_title = \'%s (%s)\' % ( node_title, N_(\'None\'))\n
    else:\n
      payment = getObject(payment_uid)\n
      node_title = "%s (%s)" % ( node_title, payment.getTitle() )\n
  \n
  if not string_index:\n
    string_index = \'%-10s\' % node_id\n
  string_index = \'%s %s\' % (string_index, node_title)\n
\n
  initial_debit_balance = data.get(\'initial_debit_balance\', 0)\n
  initial_credit_balance = data.get(\'initial_credit_balance\', 0)\n
\n
  initial_balance = initial_debit_balance - initial_credit_balance\n
  # initial debit balance actually shows \n
  initial_debit_balance = round(max(initial_balance, 0), precision)\n
  initial_credit_balance = round(max(-initial_balance, 0) or 0, precision)\n
\n
  total_initial_debit_balance += round(initial_debit_balance, precision)\n
  total_initial_credit_balance += round(initial_credit_balance, precision)\n
  final_debit_balance = round(initial_debit_balance + data[\'debit\'],\n
                              precision)\n
  final_credit_balance = round(initial_credit_balance + data[\'credit\'],\n
                               precision)\n
  closing_balance = final_debit_balance - final_credit_balance\n
  total_final_balance_if_debit += round(max(closing_balance, 0), precision)\n
  total_final_balance_if_credit += round(max(-closing_balance, 0) or 0, precision)\n
  \n
  \n
  line_list.append(Object(uid=\'new_\',\n
                          node_id=node_id,\n
                          node_title=node_title,\n
                          string_index=string_index,\n
                          node_relative_url=node_relative_url,\n
                          initial_debit_balance=initial_debit_balance,\n
                          initial_credit_balance=initial_credit_balance,\n
                          debit=data[\'debit\'],\n
                          credit=data[\'credit\'],\n
                          final_debit_balance=final_debit_balance,\n
                          final_credit_balance=final_credit_balance,\n
                          final_balance_if_debit=max(closing_balance, 0),\n
                          final_balance_if_credit=max(-closing_balance, 0) or 0,))\n
\n
if not show_empty_accounts:\n
  line_list = [ line for line in line_list\n
                if line[\'debit\'] or\n
                   line[\'credit\'] or\n
                   line[\'initial_credit_balance\'] or\n
                   line[\'initial_debit_balance\'] ]\n
\n
# sort\n
def getStringIndex(obj):\n
  return obj[\'string_index\']\n
line_list.sort(key=getStringIndex)\n
\n
# cache values for stat\n
request.set(\'TrialBalance.total_initial_debit_balance\',\n
            total_initial_debit_balance)\n
request.set(\'TrialBalance.total_initial_credit_balance\',\n
            total_initial_credit_balance)\n
request.set(\'TrialBalance.debit\', total_debit)\n
request.set(\'TrialBalance.credit\', total_credit)\n
request.set(\'TrialBalance.final_balance_if_debit\', total_final_balance_if_debit)\n
request.set(\'TrialBalance.final_balance_if_credit\', total_final_balance_if_credit)\n
return line_list\n
# vim: foldmethod=marker\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>_owner</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, **kw</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>9</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>show_empty_accounts</string>
                            <string>expand_accounts</string>
                            <string>at_date</string>
                            <string>from_date</string>
                            <string>period_start_date</string>
                            <string>section_uid</string>
                            <string>simulation_state</string>
                            <string>precision</string>
                            <string>node_uid</string>
                            <string>kw</string>
                            <string>Products.PythonScripts.standard</string>
                            <string>Object</string>
                            <string>ZTUtils</string>
                            <string>LazyFilter</string>
                            <string>_getattr_</string>
                            <string>container</string>
                            <string>request</string>
                            <string>context</string>
                            <string>portal</string>
                            <string>getInventoryList</string>
                            <string>getInventory</string>
                            <string>N_</string>
                            <string>inventory_movement_type_list</string>
                            <string>append</string>
                            <string>$append0</string>
                            <string>_getiter_</string>
                            <string>t</string>
                            <string>balance_movement_type_list</string>
                            <string>accounting_movement_type_list</string>
                            <string>dict</string>
                            <string>inventory_params</string>
                            <string>_write_</string>
                            <string>MARKER</string>
                            <string>line_per_account</string>
                            <string>account_used</string>
                            <string>account_type_to_group_by_node</string>
                            <string>profit_and_loss_account_type</string>
                            <string>account_type_to_group_by_payment</string>
                            <string>account_type_to_group_by_mirror_section</string>
                            <string>total_debit</string>
                            <string>total_credit</string>
                            <string>total_initial_debit_balance</string>
                            <string>total_initial_credit_balance</string>
                            <string>total_final_balance_if_debit</string>
                            <string>total_final_balance_if_credit</string>
                            <string>_apply_</string>
                            <string>node</string>
                            <string>_getitem_</string>
                            <string>account_props</string>
                            <string>round</string>
                            <string>max</string>
                            <string>traverse</string>
                            <string>getObject</string>
                            <string>node_title_and_id_cache</string>
                            <string>getNodeTitleAndId</string>
                            <string>initial_balance_date</string>
                            <string>min</string>
                            <string>line_list</string>
                            <string>node_relative_url</string>
                            <string>mirror_section_uid</string>
                            <string>payment_uid</string>
                            <string>data</string>
                            <string>node_title</string>
                            <string>node_id</string>
                            <string>string_index</string>
                            <string>None</string>
                            <string>third_party</string>
                            <string>payment</string>
                            <string>initial_debit_balance</string>
                            <string>initial_credit_balance</string>
                            <string>initial_balance</string>
                            <string>final_debit_balance</string>
                            <string>final_credit_balance</string>
                            <string>closing_balance</string>
                            <string>line</string>
                            <string>getStringIndex</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>AccountModule_getAccountListForTrialBalance</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
