Commit 95fd09af authored by Jérome Perrin's avatar Jérome Perrin

refactor accounting closing periods


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4748 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9139753b
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>accounting_closing_period_workflow</string> </value> <value> <string>accounting_period_workflow</string> </value>
</item> </item>
<item> <item>
<key> <string>initial_state</string> </key> <key> <string>initial_state</string> </key>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Accounting Closing Period Workflow</string> </value> <value> <string>Accounting Period Workflow</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -71,66 +71,70 @@ ...@@ -71,66 +71,70 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n \n
closing_period = state_change.object\n closing_period = state_change.object\n
portal = closing_period.getPortalObject()\n
N_ = portal.Base_TranslateString\n
accounting_module = portal.accounting_module\n
valid_states = [\'cancelled\', \'stopped\', \'delivered\']\n
\n \n
start_date = closing_period.getStartDate()\n start_date = closing_period.getStartDate()\n
stop_date = closing_period.getStopDate()\n stop_date = closing_period.getStopDate()\n
\n \n
if stop_date < start_date :\n search_params = { \'delivery.start_date\' : \'>= %s\' % start_date,\n
raise ValidationFailed, "Action Impossible: stop_date is before start_date"\n \'delivery.stop_date\' : \'<= %s\' % stop_date, }\n
transaction_list = accounting_module.searchFolder( **search_params)\n
\n \n
for cpd in context.portal_catalog(\n for transaction in transaction_list : \n
portal_type="Accounting Period Delimiter", \n transaction = transaction.getObject()\n
simulation_state="delivered") : \n if transaction.getSimulationState() not in valid_states :\n
cpd = cpd.getObject()\n raise ValidationFailed, N_("Transaction ${transaction_path} is in invalid state (${transaction_translated_state})",\n
if cpd.getStartDate() < start_date < cpd.getStopDate():\n mapping = { \'transaction_path\' : transaction.getPath(),\n
raise ValidationFailed, "Action Impossible: start_date is in a closed period"\n \'transaction_translated_state\' : unicode(transaction.getTranslatedSimulationStateTitle(), \'utf8\')})\n
if cpd.getStartDate() < stop_date < cpd.getStopDate():\n
raise ValidationFailed, "Action Impossible: stop_date is in a closed period"\n
\n
# TODO: deliver every transaction in the period (in accounting_workflow)\n
]]></string> </value> ]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAAAoAAAARAAAAQwAA <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABEAAAASAAAAQwAA
AHMlAQAAZAEAawAAbAEAfQIAAXQCAHwAAGQCAIMCAH0EAHQCAHwEAGQDAIMCAIMAAH0FAHQCAHwE AHNJAQAAZAEAawAAbAEAfQIAAXQCAHwAAGQCAIMCAH0EAHQCAHwEAGQDAIMCAIMAAH0FAHQCAHwF
AGQEAIMCAIMAAH0GAHwGAHwFAGoAAG8NAAF8AgBkBQCCAgBuAQABeMQAdAcAdAIAdAgAZAYAgwIA AGQEAIMCAH0GAHQCAHwFAGQFAIMCAH0HAGQGAGQHAGQIAGcDAH0IAHQCAHwEAGQJAIMCAIMAAH0J
ZAcAZAgAZAkAZAoAgwACgwEARF2eAH0JAHQCAHwJAGQLAIMCAIMAAH0JAHQCAHwJAGQDAIMCAIMA AHQCAHwEAGQKAIMCAIMAAH0KAGgAAARkCwBkDAB8CQAWAzwEZA0AZA4AfAoAFgM8fQsAdAwAdAIA
AHwFAAQDagAAbxYAAXQCAHwJAGQEAIMCAIMAAGoAAG4CAAIBbw0AAXwCAGQMAIICAG4BAAF0AgB8 fAcAZA8AgwIAfAsAjQEAfQ0AeIsAdA4Af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Fuc2FjdGlvbnNT
dGF0ZSgBAAAAcycAAABBY2NvdW50aW5nUGVyaW9kX0NoZWNrVHJhbnNhY3Rpb25zU3RhdGUoAAAA
ACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_workflow/accounting_closing_period_workflow/scripts/closePeriod</string> </value> <value> <string>Script (Python):/hopital/portal_workflow/accounting_period_workflow/scripts/AccountingPeriod_CheckTransactionsState</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>state_change</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
...@@ -160,11 +164,18 @@ U2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value> ...@@ -160,11 +164,18 @@ U2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>closing_period</string> <string>closing_period</string>
<string>portal</string>
<string>N_</string>
<string>accounting_module</string>
<string>valid_states</string>
<string>start_date</string> <string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>search_params</string>
<string>_apply_</string>
<string>transaction_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>context</string> <string>transaction</string>
<string>cpd</string> <string>unicode</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -181,7 +192,7 @@ U2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value> ...@@ -181,7 +192,7 @@ U2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>closePeriod</string> </value> <value> <string>AccountingPeriod_CheckTransactionsState</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
<?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 encoding="cdata"><![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
closing_period = state_change.object\n
portal = closing_period.getPortalObject()\n
N_ = portal.Base_TranslateString\n
accounting_module = portal.accounting_module\n
valid_states = [\'cancelled\', \'stopped\', \'delivered\']\n
\n
# validate all transactions states.\n
container.AccountingPeriod_CheckTransactionsState(state_change)\n
\n
start_date = closing_period.getStartDate()\n
stop_date = closing_period.getStopDate()\n
\n
search_params = { \'delivery.start_date\' : \'>= %s\' % start_date,\n
\'delivery.stop_date\' : \'<= %s\' % stop_date, }\n
transaction_list = accounting_module.searchFolder( **search_params)\n
\n
for transaction in transaction_list : \n
transaction = transaction.getObject()\n
if transaction.getSimulationState() == \'stopped\' : \n
portal.portal_workflow.doActionFor( transaction, \'deliver_action\', \n
wf_id="accounting_workflow",\n
skip_period_validation = 1)\n
if transaction.getSimulationState() != \'delivered\' : \n
raise ValidationFailed, N_("Unable to change state for ${transaction_path}, check this transaction history",\n
mapping = {\'transaction_path\' : transaction.getPath()})\n
else :\n
transaction.log(\'AccountingPeriod_DeliverTransaction\', \'deliver %s\' % transaction.getPath())\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABEAAAAXAAAAQwAA
AHOsAQAAZAEAawAAbAEAfQIAAXQCAHwAAGQCAIMCAH0EAHQCAHwEAGQDAIMCAIMAAH0FAHQCAHwF
AGQEAIMCAH0GAHQCAHwFAGQFAIMCAH0HAGQGAGQHAGQIAGcDAH0IAHQCAHQJAGQJAIMCAHwAAIMB
AAF0AgB8BABkCgCDAgCDAAB9CgB0AgB8BABkCwCDAgCDAAB9CwBoAAAEZAwAZA0AfAoAFgM8BGQO
AGQPAHwLABYDPH0MAHQNAHQCAHwHAGQQAIMCAHwMAI0BAH0OAHjbAHQPAHwOAIMBAERdzQB9EAB0
AgB8EABkEQCDAgCDAAB9EAB0AgB8EABkEgCDAgCDAABkBwBqAgBvnAABdAIAdAIAfAUAZBMAgwIA
ZBQAgwIAfBAAZBUAZBYAZBcAZBgAZBkAgwICAXQCAHwQAGQSAIMCAIMAAGQIAGoDAG8uAAF8AgB8
BgBkGgBkGwBoAAAEZBwAdAIAfBAAZB0AgwIAgwAAAzyDAQGCAgBxpAEBdAIAfBAAZB4AgwIAZB8A
ZCAAdAIAfBAAZB0AgwIAgwAAFoMCAAFx1wABcdcAV2QAAFMoIQ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_workflow/accounting_period_workflow/scripts/AccountingPeriod_DeliverTransactions</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</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>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>closing_period</string>
<string>portal</string>
<string>N_</string>
<string>accounting_module</string>
<string>valid_states</string>
<string>container</string>
<string>start_date</string>
<string>stop_date</string>
<string>search_params</string>
<string>_apply_</string>
<string>transaction_list</string>
<string>_getiter_</string>
<string>transaction</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>AccountingPeriod_DeliverTransactions</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.States</string>
<string>StateDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>confirmed</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Closed Accounting Period</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>deliver</string>
<string>deliver_action</string>
<string>plan</string>
<string>reopen_action</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Closed Period</string> </value> <value> <string>Bookeeped</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -88,8 +88,9 @@ ...@@ -88,8 +88,9 @@
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string> <string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Member</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
<tuple> <tuple>
<string>cancel</string> <string>cancel</string>
<string>cancel_action</string> <string>cancel_action</string>
<string>deliver</string> <string>plan</string>
<string>deliver_action</string> <string>plan_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.States</string>
<string>StateDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>planned</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Open</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>confirm</string>
<string>confirm_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Cancel Closing Period</string> </value> <value> <string>Cancel Accounting Period</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<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></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>confirm</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>confirmed</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Close Accounting Period</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=confirm_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>confirm</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>confirm_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>AccountingPeriod_CheckTransactionsState</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Close Accounting Period</string> </value> <value> <string>Definitively Close Accounting Period</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string>closePeriod</string> </value> <value> <string>AccountingPeriod_DeliverTransactions</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<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></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>plan</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>planned</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Open Accounting Period</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=plan_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>plan</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>plan_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>AccountingPeriod_CheckDates</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Reopen Accounting Period</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=reopen_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>plan</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reopen_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment