<?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>kwd = context.ERP5Accounting_getParams(selection_name)\n
\n
# XXX missing :(\n
# this may fail if we have movements on something else than accounts\n
#kwd[\'where_expression\'] = \'node.parent_uid = %s\' context.account_module.getUid()\n
\n
if kw.get(\'stat\'):\n
  selection_params = context.portal_selections.getSelectionParamsFor(selection_name)\n
  selection_domain = context.portal_selections.getSelectionDomainDictFor(selection_name)\n
  selection_report = context.portal_selections.getSelectionReportDictFor(selection_name)\n
  if selection_domain:\n
    kwd[\'selection_domain\'] = selection_domain\n
  if selection_report:\n
    kwd[\'selection_report\'] = selection_report\n
  if selection_params.get(\'closed_summary\'):\n
    kwd[\'closed_summary\'] = selection_params[\'closed_summary\']\n
  if context.portal_selections.getSelectionInvertModeFor(selection_name):\n
    kwd[\'stock.node_uid\'] = context.portal_selections.getSelectionInvertModeUidListFor(selection_name)\n
  # is list filtered ?\n
  elif \'title\' in selection_params or \\\n
     \'preferred_gap_id\' in selection_params or\\\n
     \'id\' in selection_params or \\\n
     \'transalated_validation_state_title\' in selection_params:\n
    # if yes, apply the same filter here\n
    kwd[\'stock.node_uid\'] = [x.uid for x in\n
                         context.portal_catalog(**selection_params)]\n
  return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
\n
kwd[\'stock.node_uid\'] = brain.uid\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
# vim: syntax=python\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>_params</string> </key>
            <value> <string>selection=None, brain=None, selection_name=None, **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>3</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>selection</string>
                            <string>brain</string>
                            <string>selection_name</string>
                            <string>kw</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>kwd</string>
                            <string>selection_params</string>
                            <string>selection_domain</string>
                            <string>selection_report</string>
                            <string>_write_</string>
                            <string>_getitem_</string>
                            <string>append</string>
                            <string>$append0</string>
                            <string>_getiter_</string>
                            <string>_apply_</string>
                            <string>x</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <none/>
                <none/>
                <none/>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>AccountModule_getAccountingTransactionCount</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
