diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml deleted file mode 100644 index 44d42fa52763292983e73ff955c3458e5d0e1fef..0000000000000000000000000000000000000000 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml +++ /dev/null @@ -1,226 +0,0 @@ -<?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> <string encoding="base64">O/INCg==</string> </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>from DateTime import DateTime\n -portal = context.getPortalObject()\n -N_ = portal.Base_translateString\n -accounting_module = portal.accounting_module\n -getInventory = portal.portal_simulation.getInventoryAssetPrice\n -\n -# FIXME: maybe it is not good to use a Organisation here and not\n -# a category ...\n -if section is None :\n - section = portal_preferences.getPreferredSourceSection()\n - if section is None :\n - raise ValueError, N_("Section must be defined in Preferences")\n -\n -section_value = portal.restrictedTraverse(section)\n -section_uid = section_value.getUid()\n -resource = section_value.getPriceCurrency()\n -currency = context.restrictedTraverse(resource)\n -precision = currency.getQuantityPrecision()\n -\n -closing_transaction = accounting_module.newContent( portal_type = "Accounting Transaction"\n - , created_by_builder = 1\n - , source = section\n - , source_section = section\n - , resource = resource\n - , start_date = at_date\n - , title = N_(\'Balance of income and expense account\')\n - )\n -\n -total_quantity = 0.0\n -for account in portal.portal_categories.account_type.income\\\n - .getAccountTypeRelatedValueList(portal_type = \'Account\') + \\\n - portal.portal_categories.account_type.expense\\\n - .getAccountTypeRelatedValueList(portal_type = \'Account\'):\n -\n - quantity = getInventory( node_uid = account.getUid()\n - , omit_simulation = 1\n - , simulation_state = [\'stopped\', \'delivered\']\n - , section_uid = section_uid\n - , at_date = at_date\n - , where_expression = " section.portal_type = \'Organisation\' "\n - )\n - quantity = quantity or 0.0\n - total_quantity += context.Base_getRoundValue(quantity, precision)\n -\n - context.log("kev closing", repr(account))\n - context.log("kev closing", repr(quantity))\n -\n - if quantity != 0.0:\n - closing_transaction.newContent( portal_type = \'Accounting Transaction Line\'\n - , source_value = account\n - , quantity = quantity\n - )\n -\n -result_line = closing_transaction.newContent( portal_type = \'Accounting Transaction Line\'\n - , source = N_(\'Select your result account\')\n - , quantity = -total_quantity\n - )\n -\n -context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" % (\n - closing_transaction.getPath(), N_(\'Closing Transaction Created.\')))\n -</string> </value> - </item> - <item> - <key> <string>_code</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>_filepath</string> </key> - <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction</string> </value> - </item> - <item> - <key> <string>_owner</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string>section, at_date</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>2</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>section</string> - <string>at_date</string> - <string>DateTime</string> - <string>_getattr_</string> - <string>context</string> - <string>portal</string> - <string>N_</string> - <string>accounting_module</string> - <string>getInventory</string> - <string>None</string> - <string>portal_preferences</string> - <string>ValueError</string> - <string>section_value</string> - <string>section_uid</string> - <string>resource</string> - <string>currency</string> - <string>precision</string> - <string>closing_transaction</string> - <string>total_quantity</string> - <string>_getiter_</string> - <string>account</string> - <string>quantity</string> - <string>repr</string> - <string>result_line</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_createClosingTransaction</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog.xml index 7368779139249cd923e03112ef502734a60a9d2a..63db2397475d5561db5bc6d4eddc31a2cab2a58e 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog.xml @@ -81,6 +81,7 @@ <list> <string>my_at_date</string> <string>my_section</string> + <string>my_transaction_details_level</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_at_date.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_at_date.xml index 4a3edb0015fe209ae8108093be0f255e2acde767..941644795b6e84fb282a269dc3e34e0ab1f3ebc2 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_at_date.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_at_date.xml @@ -309,7 +309,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>At Date</string> </value> + <value> <string>Closing Date</string> </value> </item> </dictionary> </value> @@ -464,7 +464,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>preferences/getPreferredAccountingTransactionAtDate</string> </value> + <value> <string>python: DateTime(here.portal_preferences.getPreferredAccountingTransactionAtDate().year(), 12, 31)</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_transaction_details_level.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_transaction_details_level.xml new file mode 100644 index 0000000000000000000000000000000000000000..7221cbf4c50a5c2fc0bb02ce1509e63fd3780160 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateClosingTransactionDialog/my_transaction_details_level.xml @@ -0,0 +1,277 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.StandardFields</string> + <string>RadioField</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>my_transaction_details_level</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>unknown_selection</string> </key> + <value> <string>You selected an item that was not in the list.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>orientation</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>orientation</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string>default</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <list> + <tuple> + <string>Account - Aggregate Lines by Account (default)</string> + <string>default</string> + </tuple> + <tuple> + <string encoding="cdata"><![CDATA[ + +Account > Zone - Aggregate Lines by Accounts, then Zone (Export / Local Region) + +]]></string> + <string>zone</string> + </tuple> + <tuple> + <string encoding="cdata"><![CDATA[ + +Account > Third Party - Aggregate Lines by Accounts, then Third Party + +]]></string> + <string>third_party</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>orientation</string> </key> + <value> <string>vertical</string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Aggregate Level</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData>