[Erp5-report] r42200 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 11 15:01:39 CET 2011
Author: jerome
Date: Tue Jan 11 15:01:39 2011
New Revision: 42200
URL: http://svn.erp5.org?rev=42200&view=rev
Log:
create balance transaction when we stop the period, and delete it when the period is restarted.
Added:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_deleteBalanceTransaction.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/deleteBalanceTransaction.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart.xml
Modified:
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/createBalanceTransaction.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/states/stopped.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver_action.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart_action.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop.xml
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop_action.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_deleteBalanceTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_deleteBalanceTransaction.xml?rev=42200&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_deleteBalanceTransaction.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_deleteBalanceTransaction.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -0,0 +1,75 @@
+<?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>_body</string> </key>
+ <value> <string>assert context.getSimulationState() == \'started\'\n
+id_list = []\n
+for balance_transaction in context.getCausalityRelatedValueList(\n
+ portal_type=\'Balance Transaction\'):\n
+ id_list.append(balance_transaction.getId())\n
+ assert balance_transaction.getParentValue().getId() == \'accounting_module\'\n
+\n
+if id_list:\n
+ balance_transaction.getParentValue().manage_delObjects(id_list)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>AccountingPeriod_deleteBalanceTransaction</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/createBalanceTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/createBalanceTransaction.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/createBalanceTransaction.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/createBalanceTransaction.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -62,7 +62,7 @@ portal = accounting_period.getPortalObje
profit_and_loss_account = portal.portal_workflow.getInfoFor(\n
accounting_period, \'profit_and_loss_account\')\n
\n
-accounting_period.AccountingPeriod_createBalanceTransaction(\n
+accounting_period.activate(after_method_id=\'unindexObject\').AccountingPeriod_createBalanceTransaction(\n
profit_and_loss_account=profit_and_loss_account)\n
</string> </value>
</item>
Added: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/deleteBalanceTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/deleteBalanceTransaction.xml?rev=42200&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/deleteBalanceTransaction.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/deleteBalanceTransaction.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -0,0 +1,75 @@
+<?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>_body</string> </key>
+ <value> <string>"""Deletes a previously created balance transaction\n
+"""\n
+accounting_period = sci[\'object\']\n
+\n
+# we only proceed for top level accounting periods\n
+if accounting_period.getParentValue().getPortalType() == accounting_period.getPortalType():\n
+ return\n
+\n
+accounting_period.activate().AccountingPeriod_deleteBalanceTransaction()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>sci</string> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>deleteBalanceTransaction</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/states/stopped.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/states/stopped.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/states/stopped.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/states/stopped.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -30,8 +30,8 @@
<tuple>
<string>deliver</string>
<string>deliver_action</string>
+ <string>restart</string>
<string>restart_action</string>
- <string>start</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
- <value> <string>createBalanceTransaction</string> </value>
+ <value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver_action.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver_action.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/deliver_action.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -16,7 +16,7 @@
</item>
<item>
<key> <string>actbox_url</string> </key>
- <value> <string>%(content_url)s/AccountingPeriod_viewDeliverWorkflowActionDialog?workflow_action=deliver_action</string> </value>
+ <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=deliver_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
Added: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart.xml?rev=42200&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>actbox_category</string> </key>
+ <value> <string>workflow</string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_url</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>after_script_name</string> </key>
+ <value> <string>deleteBalanceTransaction</string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string>Restarts the accounting period in order to input transactions.\r\n
+This removes existing balance transactions.</string> </value>
+ </item>
+ <item>
+ <key> <string>guard</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>restart</string> </value>
+ </item>
+ <item>
+ <key> <string>new_state_id</string> </key>
+ <value> <string>started</string> </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Restart Accounting Period</string> </value>
+ </item>
+ <item>
+ <key> <string>trigger_type</string> </key>
+ <value> <int>2</int> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart_action.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart_action.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/restart_action.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
- <value> <string>start</string> </value>
+ <value> <string>restart</string> </value>
</item>
<item>
<key> <string>description</string> </key>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
- <value> <string></string> </value>
+ <value> <string>createBalanceTransaction</string> </value>
</item>
<item>
<key> <string>description</string> </key>
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop_action.xml?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop_action.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/transitions/stop_action.xml [utf8] Tue Jan 11 15:01:39 2011
@@ -16,7 +16,7 @@
</item>
<item>
<key> <string>actbox_url</string> </key>
- <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=stop_action</string> </value>
+ <value> <string>%(content_url)s//AccountingPeriod_viewDeliverWorkflowActionDialog?workflow_action=stop_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
@@ -52,6 +52,12 @@
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
+ <item>
+ <key> <string>var_exprs</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+ </value>
+ </item>
</dictionary>
</pickle>
</record>
@@ -72,4 +78,39 @@
</dictionary>
</pickle>
</record>
+ <record id="3" aka="AAAAAAAAAAM=">
+ <pickle>
+ <global name="PersistentMapping" module="Persistence.mapping"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>data</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>profit_and_loss_account</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
+ </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="4" aka="AAAAAAAAAAQ=">
+ <pickle>
+ <global name="Expression" module="Products.CMFCore.Expression"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>text</string> </key>
+ <value> <string>kwargs/profit_and_loss_account | nothing </string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
</ZopeData>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=42200&r1=42199&r2=42200&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Tue Jan 11 15:01:39 2011
@@ -1 +1 @@
-1417
\ No newline at end of file
+1418
\ No newline at end of file
More information about the Erp5-report
mailing list