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

# XXX workarounds for DTML limitation\n
# Because DTML cannot do <dtml-if node or resource or...>\n
# If Python is used, it does not check the existence of a variable automatically\n
\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
if \'node\' not in params:\n
  params[\'node\'] = []\n
if \'resource\' not in params:\n
  params[\'resource\'] = []\n
if \'from_date\' not in params:\n
  params[\'from_date\'] = \'\'\n
if \'to_date\' not in params:\n
  params[\'to_date\'] = \'\'\n
if \'section_category\' not in params:\n
  params[\'section_category\'] = \'\'\n
\n
if params.get(\'stat\', 0):\n
  params[\'stat\'] = 0\n
if params.get(\'count\', 0):\n
  params[\'count\'] = 0\n
params[\'omit_input\'] = 0\n
params[\'omit_output\'] = 0\n
\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
  operation_date_dict = params[\'operation_date\']\n
  ss_q = Query(format=operation_date_dict[\'format\'],\n
               type=operation_date_dict[\'type\'],\n
               **{\'delivery.start_date\':operation_date_dict[\'query\']})\n
  params[\'source_section_where_expression\'] = ss_q(datetime_search_keys=[\'delivery.start_date\'])[\'where_expression\']\n
  ds_q = Query(format=operation_date_dict[\'format\'],\n
               type=operation_date_dict[\'type\'],\n
               **{\'delivery.stop_date\':operation_date_dict[\'query\']})\n
  params[\'destination_section_where_expression\'] = ds_q(datetime_search_keys=[\'delivery.stop_date\'])[\'where_expression\']\n
  del params[\'operation_date\']\n
\n
# this method can be used to build another complex query, for example\n
# as a catalog.parent_uid filter with SimulationTool.getMovementList.\n
# In this example, you can use side independant inventory API with \n
# accounting module selection. see erp5_accounting_l10n_fr_m9 for an example.\n
src__ = context.REQUEST.other.get(\'src__\', 0)\n
no_limit = context.REQUEST.other.get(\'no_limit\', 0)\n
search_result_keys = context.REQUEST.other.get(\'search_result_keys\', None)\n
\n
return context.AccountingTransactionModule_zGetAccountingTransactionList( \n
                            selection_params=params,\n
                            src__=src__,\n
                            search_result_keys=search_result_keys,\n
                            no_limit=no_limit, **params)\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>**params</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>params</string>
                            <string>Products.ZSQLCatalog.SQLCatalog</string>
                            <string>Query</string>
                            <string>_write_</string>
                            <string>_getattr_</string>
                            <string>_getitem_</string>
                            <string>operation_date_dict</string>
                            <string>_apply_</string>
                            <string>ss_q</string>
                            <string>ds_q</string>
                            <string>context</string>
                            <string>src__</string>
                            <string>no_limit</string>
                            <string>None</string>
                            <string>search_result_keys</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>AccountingTransactionModule_getAccountingTransactionList</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
