diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/AccountingTransaction_searchInvoiceTransactionLines.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/AccountingTransaction_searchInvoiceTransactionLines.xml deleted file mode 100644 index 341f6aa02bcb6243f773e6b680013ba65810e127..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/AccountingTransaction_searchInvoiceTransactionLines.xml +++ /dev/null @@ -1,180 +0,0 @@ -<?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>sort_dict = { \'income\': \'\\0\\0\',\n - \'expense\': \'\\0\\0\',\n - \'receivable\': \'\\0\\1\',\n - \'payable\': \'\\0\\1\',\n - \'collected_vat\': \'\\0\\2\',\n - \'refundable_vat\': \'\\0\\3\' }\n -\n -def sortInvoiceTransactionLine(a, b):\n - a_id = a.getId()\n - if a_id in sort_dict:\n - a_id = sort_dict[a_id]\n - b_id = b.getId()\n - if b_id in sort_dict:\n - b_id = sort_dict[b_id]\n - return cmp(a_id, b_id)\n -\n -\n -object_list = []\n -for obj in context.objectValues() : \n - obj = obj.getObject()\n - if kw.has_key(\'portal_type\') : \n - if obj.getPortalType() in kw[\'portal_type\'] : \n - object_list.append(obj)\n - else : \n - object_list.append(obj)\n -\n -object_list.sort(sortInvoiceTransactionLine)\n -return object_list\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>**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>0</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>kw</string> - <string>sort_dict</string> - <string>sortInvoiceTransactionLine</string> - <string>object_list</string> - <string>_getiter_</string> - <string>_getattr_</string> - <string>context</string> - <string>obj</string> - <string>_getitem_</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>AccountingTransaction_searchInvoiceTransactionLines</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/BankAccount_getAccountingTransactionList.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/BankAccount_getAccountingTransactionList.xml deleted file mode 100644 index 7ea45c603a977ab7982d65874154b01621fd0686..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/BankAccount_getAccountingTransactionList.xml +++ /dev/null @@ -1,209 +0,0 @@ -<?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>kwd = {}\n -\n -# read settings from user preference\n -preference = context.getPortalObject().portal_preferences\n -from_date = preference.getPreferredAccountingTransactionFromDate()\n -#if from_date :\n -# kwd[\'from_date\'] = from_date\n -#at_date = preference.getPreferredAccountingTransactionAtDate()\n -#if at_date :\n -# kwd[\'at_date\'] = at_date\n -#simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n -#if simulation_state :\n -# kwd[\'transaction_simulation_state\'] = simulation_state\n -#section_category = preference.getPreferredAccountingTransactionSectionCategory()\n -#if section_category :\n -# kwd[\'transaction_section_category\'] = section_category\n -\n -kwd[\'from_date\']=context.REQUEST[\'from_date\']\n -kwd[\'to_date\']=context.REQUEST[\'to_date\']\n -kwd[\'transaction_simulation_state\']=context.REQUEST[\'transaction_simulation_state\']\n -kwd[\'transaction_section_category\']=context.REQUEST[\'transaction_section_category\']\n -\n -# parameters only used in reports\n -if kw.has_key(\'node_uid\'):\n - kwd[\'node_uid\'] = transaction_selection[\'node_uid\']\n -if kw.has_key(\'transaction_portal_type\'):\n - kwd[\'transaction_portal_type\'] = transaction_selection[\'transaction_portal_type\']\n -\n -result = context.BankAccount_zGetAccountingTransactionList(**kwd)\n -new_result = []\n -\n -net_balance = 0.0\n -# FIXME:\n -# using listbox current page number * number of line per listbox page, you can call a \n -# ZSQL Method to initialize net_balance and calculate this only for this page.\n -#\n -# But this is just temporary because some day, erp5_accounting will be rewritten using\n -# only portal_catalog and getInventory. The Iventory API should provide a way to implement\n -# such a net_balance column (in one instruction, so that we do not need to write a wrapping \n -# list method like this one)\n -# \n -for l in result:\n - o = l.getObject()\n - net_balance += l.source_balance or 0.0\n - if o is not None:\n - c = o.asContext(net_balance = net_balance,\n - source_balance=l.source_balance,\n - source_credit=l.source_credit,\n - source_debit=l.source_debit )\n - new_result.append(c)\n -\n -return new_result\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>**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>0</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>kw</string> - <string>kwd</string> - <string>_getattr_</string> - <string>context</string> - <string>preference</string> - <string>from_date</string> - <string>_getitem_</string> - <string>_write_</string> - <string>transaction_selection</string> - <string>_apply_</string> - <string>result</string> - <string>new_result</string> - <string>net_balance</string> - <string>_getiter_</string> - <string>l</string> - <string>o</string> - <string>_inplacevar_</string> - <string>None</string> - <string>c</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>BankAccount_getAccountingTransactionList</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/FiscalReportCell_calcBalance.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/FiscalReportCell_calcBalance.xml deleted file mode 100644 index 52075bd443d3e8dedebe50372d1b8799ee235351..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/FiscalReportCell_calcBalance.xml +++ /dev/null @@ -1,154 +0,0 @@ -<?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>inc=-context.FiscalReportCell_doGetInventory(acc_inc)\n -exp=-context.FiscalReportCell_doGetInventory(acc_exp)\n -\n -if profit:\n - return max(inc-exp,0)\n -else:\n - return max(exp-inc,0)\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>acc_inc,acc_exp,profit=True</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>acc_inc</string> - <string>acc_exp</string> - <string>profit</string> - <string>_getattr_</string> - <string>context</string> - <string>inc</string> - <string>exp</string> - <string>max</string> - </tuple> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>func_defaults</string> </key> - <value> - <tuple> - <int>1</int> - </tuple> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>FiscalReportCell_calcBalance</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/GroupPresencePeriod_setPolishHolidayExceptions.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/GroupPresencePeriod_setPolishHolidayExceptions.xml deleted file mode 100644 index 1a345bba554107b1e67e4e27a25e26ce5117b6d9..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/GroupPresencePeriod_setPolishHolidayExceptions.xml +++ /dev/null @@ -1,170 +0,0 @@ -<?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>"""\n - This script sets all standard (non-movable) holidays for polish calendar\n - on context Group Calendar Period.\n - Year defaults to current year.\n -"""\n -\n -part_holiday_list = [\'01-01\',\'05-01\',\'05-03\',\'08-15\',\'11-01\',\'11-11\',\'12-25\',\'12-26\']\n -holiday_list = [\'-\'.join((str(year),holiday)) for holiday in part_holiday_list]\n -\n -for day in holiday_list:\n - holiday = DateTime(day)\n - context.newContent(portal_type = \'Calendar Exception\',\n - exception_date = holiday)\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>year = DateTime().year()</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>1</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>year</string> - <string>part_holiday_list</string> - <string>append</string> - <string>$append0</string> - <string>_getiter_</string> - <string>holiday</string> - <string>_getattr_</string> - <string>str</string> - <string>holiday_list</string> - <string>day</string> - <string>DateTime</string> - <string>context</string> - </tuple> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>func_defaults</string> </key> - <value> - <tuple> - <int>2008</int> - </tuple> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>GroupPresencePeriod_setPolishHolidayExceptions</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/simpleTranslate.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/simpleTranslate.xml deleted file mode 100644 index 72f936a3900fbd51d1efd9d29fad63112f6acc52..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/simpleTranslate.xml +++ /dev/null @@ -1,142 +0,0 @@ -<?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>return tekst.encode(\'utf8\')\n -return context.translation_service.translate(\'ui\', tekst).encode(\'utf8\')\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>tekst</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>1</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>tekst</string> - <string>_getattr_</string> - <string>context</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>simpleTranslate</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/test_FiscalReportCell_doGetInventory.xml b/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/test_FiscalReportCell_doGetInventory.xml deleted file mode 100644 index 789cac15316498c5cec86bbbb49c89f900f22938..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting_l10n_pl/SkinTemplateItem/portal_skins/erp5_accounting_l10n_pl/test_FiscalReportCell_doGetInventory.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?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>"""\n - This scripts add the balance of every gap account in the list \'accounts\'\n - it use portal_simulation.getInventory. \n - The following REQUEST keys are mandatory : \n - at_date\n -\n - those are optional : \n - gap_base\n - simulation_state\n - resource\n - section_category\n -\n - those are ignored from the request and should explicitely passed as keywords args to this script : \n - from_date\n - \n - parameters keywords to this script overrides REQUEST keys\n -\n -"""\n -def shortAccountNumberToFullGapCategory(accountNumber):\n - \'\'\'translacja numeru konta na peln\xc4\x85 \xc5\x9bcie\xc5\xbck\xc4\x99 do konta\n - w drzewie gap\'\'\'\n - # slownik numerow \'unusual\' (takich ktorych parent jest nietypowy)\n - unu={\'222-03\':True, \'222-07\':True, \'222-22\':True, \'223-01\':True, \'223-02\':True, \'223-03\':True, \'223-04\':True, \'223-05\':True, \'223-06\':True, \'227-01\':True, \'227-11\':True, \'227-12\':True, \'227-13\':True, \'227-14\':True, \'227-23\':True, \'249-91\':True, \'249-92\':True, \'29-20\':True, \'29-24\':True, \'75-0-01\':True, \'75-0-02\':True, \'75-0-03\':True, \'75-0-04\':True, \'75-1-01\':True, \'75-1-02\':True, \'75-1-03\':True, \'75-1-04\':True, \'75-1-05\':True, \'75-1-06\':True, \'75-1-07\':True, \'76-0-01\':True, \'76-0-02\':True, \'76-0-03\':True, \'76-0-04\':True, \'76-0-05\':True, \'76-0-06\':True, \'76-1-01\':True, \'76-1-02\':True, \'76-1-03\':True, \'76-1-04\':True, \'76-1-05\':True, \'76-1-06\':True, \'76-1-07\':True, \'76-1-08\':True, \'76-1-09\':True, \'76-1-10\':True, \'77-0-01\':True, \'77-0-02\':True, \'77-0-03\':True, \'77-1-01\':True, \'77-1-02\':True, \'77-1-03\':True, \'79-0-01\':True, \'79-0-02\':True, \'79-0-03\':True, \'79-1-01\':True, \'79-1-02\':True, \'79-1-03\':True}\n - accountNumber=accountNumber.strip()\n - unusual=unu.has_key(accountNumber)\n - gapt=accountNumber.split(\'-\')\n - path=[]\n - path.append(request.get(\'gap_base\',\'gap/pl/wpk\'))\n - for i in range(len(accountNumber)):\n - if accountNumber[i]!=\'-\':\n - if not (unusual and i==len(accountNumber)-2):\n - path.append(accountNumber[:i+1])\n - return \'/\'.join(path)\n -\n -request = context.REQUEST\n -kw = {}\n -kw[\'omit_simulation\'] = 1\n -kw["simulation_state"] = request.get("simulation_state", [\'stopped\', \'delivered\'])\n -kw["resource"] = request.get("resource", "price_currency/PLN")\n -kw["section_uid"] = context.restrictedTraverse(request.get("organisation")).getUid()\n -kw["at_date"] = request[\'at_date\']\n -kw.update(params_kw)\n -\n -sum = 0\n -for account in accounts :\n - kw["node_category"] = shortAccountNumberToFullGapCategory(account)\n - # checks the node category exists\n - if context.restrictedTraverse(\'portal_categories/%s\' % kw["node_category"], None) is not None :\n - context.log(\'KW\',kw)\n - val = (context.portal_simulation.getInventory(**kw) or 0)\n - sum += val\n -return float ("%.2f"%(sum))\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>accounts, **params_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>1</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>accounts</string> - <string>params_kw</string> - <string>request</string> - <string>shortAccountNumberToFullGapCategory</string> - <string>_getattr_</string> - <string>context</string> - <string>kw</string> - <string>_write_</string> - <string>_getitem_</string> - <string>sum</string> - <string>_getiter_</string> - <string>account</string> - <string>None</string> - <string>_apply_</string> - <string>val</string> - <string>_inplacevar_</string> - <string>float</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>test_FiscalReportCell_doGetInventory</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting_l10n_pl/bt/revision b/bt5/erp5_accounting_l10n_pl/bt/revision index aaa6442fe902e96a5233b136b973b96a4011fc18..f70d7bba4ae1f07682e0358bd7a2068094fc023b 100644 --- a/bt5/erp5_accounting_l10n_pl/bt/revision +++ b/bt5/erp5_accounting_l10n_pl/bt/revision @@ -1 +1 @@ -41 \ No newline at end of file +42 \ No newline at end of file