<?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>request = container.REQUEST\n
portal = context.getPortalObject()\n
ctool = portal.portal_catalog\n
stool = portal.portal_simulation\n
\n
# we use a different selection for dialog params, because we never want this\n
# selection to be reseteted\n
dialog_selection_params = portal.portal_selections.getSelectionParamsFor(\n
                               \'grouping_reference_fast_input_selection\')\n
\n
# support pseudo sorting; sorting is done by uid.\n
orig_sort_on = portal.portal_selections.getSelectionSortOrder(\n
                 \'accounting_transaction_module_grouping_reference_fast_input\')\n
sort_on = []\n
for sort_column, sort_order in orig_sort_on:\n
  if sort_column in (\'grouping_reference\', \'date\', \'parent_title\'):\n
    sort_on += [(sort_column, sort_order)]\n
  elif sort_column == \'node_title\':\n
    sort_on += [(\'stock.node_uid\', sort_order)]\n
  elif sort_column == \'Movement_getMirrorSectionTitle\':\n
    sort_on += [(\'stock.mirror_section_uid\', sort_order)]\n
\n
extra_query_keys = {}\n
section_uid = portal.Base_getSectionUidListForSectionCategory(\n
     portal.portal_preferences.getPreferredAccountingTransactionSectionCategory())\n
\n
grouping = dialog_selection_params.get(\'grouping\', \'grouping\')\n
\n
search_kw = dict()\n
node = node or request.get(\'node\') or dialog_selection_params.get(\'node\')\n
if node:\n
  search_kw[\'node_uid\'] = portal.restrictedTraverse(node).getUid()\n
mirror_section = mirror_section or request.get(\'mirror_section\')\n
if mirror_section:\n
  search_kw[\'mirror_section_uid\'] = portal.restrictedTraverse(\n
                                          mirror_section).getUid()\n
\n
if grouping == \'grouping\':\n
  where_expression = \'catalog.grouping_reference is NULL\'\n
else:\n
  assert grouping == \'ungrouping\', grouping\n
  where_expression = \'catalog.grouping_reference is not NULL\'\n
    \n
return stool.getMovementHistoryList(\n
                          section_uid=section_uid,\n
                          simulation_state=[\'stopped\', \'delivered\'],\n
                          where_expression=where_expression,\n
                          sort_on=sort_on,\n
                          **search_kw)\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>selection=None, grouping=\'grouping\', node=\'\', mirror_section=\'\', **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>4</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>selection</string>
                            <string>grouping</string>
                            <string>node</string>
                            <string>mirror_section</string>
                            <string>kw</string>
                            <string>_getattr_</string>
                            <string>container</string>
                            <string>request</string>
                            <string>context</string>
                            <string>portal</string>
                            <string>ctool</string>
                            <string>stool</string>
                            <string>dialog_selection_params</string>
                            <string>orig_sort_on</string>
                            <string>sort_on</string>
                            <string>_getiter_</string>
                            <string>sort_column</string>
                            <string>sort_order</string>
                            <string>_inplacevar_</string>
                            <string>extra_query_keys</string>
                            <string>section_uid</string>
                            <string>dict</string>
                            <string>search_kw</string>
                            <string>_write_</string>
                            <string>where_expression</string>
                            <string>AssertionError</string>
                            <string>_apply_</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <none/>
                <string>grouping</string>
                <string></string>
                <string></string>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>AccountingTransactionModule_getTransactionLineListForGroupingReference</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
