<?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>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>""" Trial balance.\n
"""\n
from Products.ERP5Form.Report import ReportSection\n
\n
request = context.REQUEST\n
portal  = context.portal_url.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
at_date  = request[\'at_date\']\n
from_date = request.get(\'from_date\', None)\n
simulation_state = request[\'simulation_state\']\n
expand_accounts = request.get(\'expand_accounts\', False)\n
show_empty_accounts = request[\'show_empty_accounts\']\n
per_account_class_summary = request[\'per_account_class_summary\']\n
\n
section_uid = portal.Base_getSectionUidListForSectionCategory(\n
                                   request[\'section_category\'])\n
\n
period_start_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\n
       section_category=request[\'section_category\'], date=from_date or at_date)\n
# for the report summary\n
request.set(\'period_start_date\', period_start_date)\n
\n
if not from_date:\n
  from_date = period_start_date\n
\n
# currency precision\n
currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
request.set(\'precision\', precision)\n
\n
\n
# optional GAP filter\n
node_uid = []\n
gap = request.get(\'gap\', None)\n
if gap:\n
  gap_value = portal.portal_categories.gap.restrictedTraverse(gap)\n
  node_uid = [x.uid for x in gap_value.getCategoryMemberValueList(\n
                portal_type=\'Account\')]\n
\n
request.set(\'is_accounting_report\', True)\n
\n
# flat_mode is a boolean that indicate wether we should use a report tree or a\n
# flat list of all accounts.\n
if request.get(\'tree_mode\', False): # TODO\n
  raise \'Tree mode no longer supported\'\n
\n
return [ ReportSection(\n
            path=portal.account_module.getPhysicalPath(),\n
            level=1,\n
            form_id=\'AccountModule_viewAccountListForTrialBalance\',\n
            selection_name=\'trial_balance_selection\',\n
            selection_params=dict(show_empty_accounts=show_empty_accounts,\n
                                  expand_accounts=expand_accounts,\n
                                  at_date=at_date.latestTime(),\n
                                  from_date=from_date.earliestTime(),\n
                                  period_start_date=\n
                                          period_start_date.earliestTime(),\n
                                  section_uid=section_uid,\n
                                  simulation_state=simulation_state,\n
                                  precision=precision,\n
                                  node_uid=node_uid,\n
                                  per_account_class_summary=\n
                                          per_account_class_summary), )]\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></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>0</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>Products.ERP5Form.Report</string>
                            <string>ReportSection</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>request</string>
                            <string>portal</string>
                            <string>N_</string>
                            <string>_getitem_</string>
                            <string>at_date</string>
                            <string>None</string>
                            <string>from_date</string>
                            <string>simulation_state</string>
                            <string>False</string>
                            <string>expand_accounts</string>
                            <string>show_empty_accounts</string>
                            <string>per_account_class_summary</string>
                            <string>section_uid</string>
                            <string>period_start_date</string>
                            <string>currency</string>
                            <string>precision</string>
                            <string>node_uid</string>
                            <string>gap</string>
                            <string>gap_value</string>
                            <string>append</string>
                            <string>$append0</string>
                            <string>_getiter_</string>
                            <string>x</string>
                            <string>True</string>
                            <string>dict</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_getTrialBalanceReportSectionList</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
