From 309579c4b10bca0c25821c14eb26641fd8f71f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 5 Jul 2017 07:38:14 +0000 Subject: [PATCH] accounting: remove unused AccountingTransactionModule_statSource{Debit,Credit} --- ...ntingTransactionModule_statSourceCredit.py | 20 ------ ...tingTransactionModule_statSourceCredit.xml | 62 ------------------- ...untingTransactionModule_statSourceDebit.py | 19 ------ ...ntingTransactionModule_statSourceDebit.xml | 62 ------------------- 4 files changed, 163 deletions(-) delete mode 100644 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.py delete mode 100644 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml delete mode 100644 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.py delete mode 100644 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.py deleted file mode 100644 index f057a3ae9b..0000000000 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.py +++ /dev/null @@ -1,20 +0,0 @@ -params = context.portal_selections.getSelectionParamsFor(selection_name) - -params['stat'] = 1 -params['omit_input'] = 1 -params['omit_output'] = 0 - -if (params.get('operation_date') or {}).get('query'): - buildSQLQuery = context.portal_catalog.buildSQLQuery - params['source_section_where_expression'] = buildSQLQuery( - **{'delivery.start_date': params['operation_date']})['where_expression'] - params['destination_section_where_expression'] = buildSQLQuery( - **{'delivery.stop_date': params['operation_date']})['where_expression'] - del params['operation_date'] - -result = context.AccountingTransactionModule_zGetAccountingTransactionList( - selection=selection, - selection_params=params, **params) -row = result[0] -return float('%.02f' % (row.total_price and - row.total_price or 0.0)) -# vim: syntax=python diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml deleted file mode 100644 index 9b35f2d5ce..0000000000 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </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>_params</string> </key> - <value> <string>selection=None, selection_name=None, **kw</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>AccountingTransactionModule_statSourceCredit</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.py deleted file mode 100644 index 2c3a7fe941..0000000000 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.py +++ /dev/null @@ -1,19 +0,0 @@ -params = context.portal_selections.getSelectionParamsFor(selection_name) - -params['stat'] = 1 -params['omit_output'] = 1 -params['omit_input'] = 0 - -if (params.get('operation_date') or {}).get('query'): - buildSQLQuery = context.portal_catalog.buildSQLQuery - params['source_section_where_expression'] = buildSQLQuery( - **{'delivery.start_date': params['operation_date']})['where_expression'] - params['destination_section_where_expression'] = buildSQLQuery( - **{'delivery.stop_date': params['operation_date']})['where_expression'] - del params['operation_date'] - -result = context.AccountingTransactionModule_zGetAccountingTransactionList( - selection=selection, selection_params = params, **params) -row = result[0] -return float('%.02f' % (row.total_price or 0.0)) -# vim: syntax=python diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml deleted file mode 100644 index 9496ae1bda..0000000000 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </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>_params</string> </key> - <value> <string>selection=None, selection_name=None, **kw</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>AccountingTransactionModule_statSourceDebit</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> -- 2.30.9