Commit e585b05a authored by Jérome Perrin's avatar Jérome Perrin

Refactor the use of Accounting Period. Closing a period will new create a balance transaction.

Balance Transaction also changed, it now uses destination by default, because BalanceTransaction will in the near future be catalogued as inventories.
Accounting Period workflow was also simplified a lot.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15786 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3e419fe
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/AccountingTransactionLine_view</string> </value> <value> <string>string:${object_url}/AccountingTransactionLine_viewDestination</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -70,41 +70,174 @@ ...@@ -70,41 +70,174 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n """Creates a balance transaction to open the next period.\n
\n \n
closing_period = state_change[\'object\']\n """\n
portal = closing_period.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n N_ = portal.Base_translateString\n
accounting_module = portal.accounting_module\n \n
valid_states = [\'cancelled\', \'stopped\', \'delivered\']\n precision_cache = dict()\n
\n def roundCurrency(value, resource_relative_url):\n
start_date = closing_period.getStartDate()\n if resource_relative_url not in precision_cache:\n
stop_date = closing_period.getStopDate()\n qty_precision = portal.restrictedTraverse(\n
\n resource_relative_url).getQuantityPrecision()\n
search_params = { \'delivery.start_date\': \'>= %s\' % start_date\n precision_cache[resource_relative_url] = qty_precision\n
, \'delivery.stop_date\' : \'<= %s\' % stop_date\n qty_precision = precision_cache[resource_relative_url]\n
, \'simulation_state\' : [\'draft\', \'planned\', \'confirmed\'] \n return round(value, qty_precision)\n
}\n \n
transaction_list = accounting_module.searchFolder( **search_params )\n at_date = context.getStopDate()\n
\n assert at_date\n
organisation_section = closing_period.getParentValue()\n \n
for transaction in transaction_list:\n section = context.getParentValue()\n
transaction = transaction.getObject()\n section_uid = context.getParentUid()\n
# we only take into account transaction that are related to this\n section_currency = section.getPriceCurrency()\n
# organisation. \n \n
# FIXME: this approach is not compatible with categories as section.\n balance_transaction = portal.accounting_module.newContent(\n
# FIXME: and not compatible with 100 000 transactions, but as we only search\n portal_type=\'Balance Transaction\',\n
# for draft, planned or confirmed transactions, it should be ok.\n start_date=(at_date + 1).earliestTime(),\n
if organisation_section.getUid() in [ transaction.getSourceSectionUid()\n title=context.getTitle() or N_(\'Balance Transaction\'),\n
, transaction.getDestinationSectionUid()]:\n destination_section_value=section,\n
if transaction.getSimulationState() not in valid_states:\n resource=section_currency,\n
raise ValidationFailed, N_(\n causality_value=context)\n
"Transaction <a href=\'${url}\'>${path}</a> is in invalid state (${state})",\n \n
mapping = { \'url\' : transaction.absolute_url()\n group_by_node_node_category_list = []\n
, \'path\' : transaction.getPath()\n group_by_mirror_section_node_category_list = []\n
, \'state\': unicode(transaction.getTranslatedSimulationStateTitle(), \'utf8\')\n group_by_payment_node_category_list = []\n
}\n profit_and_loss_node_category_list = []\n
)\n \n
node_category_list = portal.portal_categories\\\n
.account_type.getCategoryChildValueList()\n
for node_category in node_category_list:\n
node_category_url = node_category.getRelativeUrl()\n
if node_category_url in (\n
\'account_type/asset/cash/bank\',):\n
group_by_payment_node_category_list.append(node_category_url)\n
elif node_category_url in (\n
\'account_type/asset/receivable\',\n
\'account_type/liability/payable\'):\n
group_by_mirror_section_node_category_list.append(node_category_url)\n
elif node_category_url in (\'account_type/income\', \'account_type/expense\'):\n
profit_and_loss_node_category_list.append(node_category_url)\n
else:\n
group_by_node_node_category_list.append(node_category_url)\n
\n
getInventoryList = portal.portal_simulation.getInventoryList\n
\n
inventory_param_dict = dict(section_uid=section_uid,\n
simulation_state=(\'delivered\',),\n
portal_type=portal.getPortalAccountingMovementTypeList(),\n
at_date=at_date.latestTime(),)\n
\n
section_currency_uid = context.getParentValue().getPriceCurrencyUid()\n
\n
profit_and_loss_quantity = 0\n
\n
for inventory in getInventoryList(\n
node_category_strict_membership=group_by_node_node_category_list,\n
group_by_node=1,\n
group_by_resource=1,\n
**inventory_param_dict):\n
\n
total_price = roundCurrency(inventory.total_price, section_currency)\n
quantity = roundCurrency(inventory.total_quantity,\n
inventory.resource_relative_url)\n
\n
if inventory.resource_uid != section_currency_uid:\n
if inventory.node_relative_url == profit_and_loss_account:\n
raise ValueError(\'Using multiple currencies on profit and loss account \'\n
\'is not supported\')\n
profit_and_loss_quantity += total_price\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
resource=inventory.resource_relative_url,\n
quantity=quantity,\n
destination_total_asset_price=total_price)\n
else:\n
if total_price != quantity:\n
# If this fail for you, your accounting doesn\'t use currencies with\n
# consistency\n
raise ValueError(\'Different price: %s != %s \' % (\n
total_price, quantity))\n
\n
if inventory.node_relative_url != profit_and_loss_account:\n
profit_and_loss_quantity += total_price\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
quantity=total_price)\n
\n
\n
for inventory in getInventoryList(\n
node_category_strict_membership=group_by_mirror_section_node_category_list,\n
group_by_node=1,\n
group_by_mirror_section=1,\n
group_by_resource=1,\n
**inventory_param_dict):\n
\n
total_price = roundCurrency(inventory.total_price, section_currency)\n
quantity = roundCurrency(inventory.total_quantity,\n
inventory.resource_relative_url)\n
profit_and_loss_quantity += total_price\n
\n
if inventory.resource_uid != section_currency_uid:\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
source_section_uid=inventory.mirror_section_uid,\n
resource=inventory.resource_relative_url,\n
quantity=quantity,\n
destination_total_asset_price=total_price)\n
else:\n
if total_price != quantity:\n
raise ValueError(\'Different price: %s != %s \' % (\n
total_price, quantity))\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
source_section_uid=inventory.mirror_section_uid,\n
quantity=total_price)\n
\n
\n
for inventory in getInventoryList(\n
node_category_strict_membership=group_by_payment_node_category_list,\n
group_by_node=1,\n
group_by_payment=1,\n
group_by_resource=1,\n
**inventory_param_dict):\n
\n
total_price = roundCurrency(inventory.total_price, section_currency)\n
quantity = roundCurrency(inventory.total_quantity,\n
inventory.resource_relative_url)\n
profit_and_loss_quantity += total_price\n
\n
if inventory.resource_uid != section_currency_uid:\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
resource=inventory.resource_relative_url,\n
quantity=quantity,\n
destination_payment_uid=inventory.payment_uid,\n
destination_total_asset_price=total_price)\n
else:\n
if total_price != quantity:\n
raise ValueError(\'Different price: %s != %s \' % (\n
total_price, quantity))\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=inventory.node_relative_url,\n
destination_payment_uid=inventory.payment_uid,\n
quantity=total_price)\n
\n
# add a final line for p&l\n
balance_transaction.newContent(\n
portal_type=\'Balance Transaction Line\',\n
destination=profit_and_loss_account,\n
quantity=-profit_and_loss_quantity)\n
\n
# and go to delivered state directly (the user is not supposed to edit this document)\n
balance_transaction.stop()\n
balance_transaction.deliver()\n
]]></string> </value> ]]></string> </value>
...@@ -121,9 +254,15 @@ for transaction in transaction_list:\n ...@@ -121,9 +254,15 @@ for transaction in transaction_list:\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>profit_and_loss_account=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -149,25 +288,37 @@ for transaction in transaction_list:\n ...@@ -149,25 +288,37 @@ for transaction in transaction_list:\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>profit_and_loss_account</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getitem_</string>
<string>closing_period</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>N_</string>
<string>accounting_module</string> <string>dict</string>
<string>valid_states</string> <string>precision_cache</string>
<string>start_date</string> <string>roundCurrency</string>
<string>stop_date</string> <string>at_date</string>
<string>search_params</string> <string>AssertionError</string>
<string>_apply_</string> <string>section</string>
<string>transaction_list</string> <string>section_uid</string>
<string>organisation_section</string> <string>section_currency</string>
<string>balance_transaction</string>
<string>group_by_node_node_category_list</string>
<string>group_by_mirror_section_node_category_list</string>
<string>group_by_payment_node_category_list</string>
<string>profit_and_loss_node_category_list</string>
<string>node_category_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>transaction</string> <string>node_category</string>
<string>unicode</string> <string>node_category_url</string>
<string>getInventoryList</string>
<string>inventory_param_dict</string>
<string>section_currency_uid</string>
<string>profit_and_loss_quantity</string>
<string>_apply_</string>
<string>inventory</string>
<string>total_price</string>
<string>quantity</string>
<string>ValueError</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -179,12 +330,14 @@ for transaction in transaction_list:\n ...@@ -179,12 +330,14 @@ for transaction in transaction_list:\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingPeriod_CheckTransactionsState</string> </value> <value> <string>AccountingPeriod_createBalanceTransaction</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Comments</string> </value> <value> <string>Description</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -4,14 +4,26 @@ ...@@ -4,14 +4,26 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.ERP5Form.ProxyField</string>
<string>StringField</string> <string>ProxyField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_translated_simulation_state_title</string> </value> <value> <string>my_translated_simulation_state_title</string> </value>
...@@ -24,14 +36,6 @@ ...@@ -24,14 +36,6 @@
<key> <string>external_validator_failed</string> </key> <key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -40,71 +44,15 @@ ...@@ -40,71 +44,15 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>field_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>external_validator</string> </key> <key> <string>form_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -115,71 +63,15 @@ ...@@ -115,71 +63,15 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>field_id</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>display_maxwidth</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>display_width</string> </key> <key> <string>form_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>target</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -190,72 +82,16 @@ ...@@ -190,72 +82,16 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string>my_translated_workflow_state_title</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>form_id</string> </key>
<value> <int>0</int> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>target</string> </key>
<value> <int>0</int> </value> <value> <string>Click to edit the target</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Workflow_statusModify</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_comment</string>
<string>my_workflow_action</string>
<string>your_profit_and_loss_account</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingPeriod_viewDeliverWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_viewWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate Workflow Action</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>TextAreaField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_comment</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>line_too_long</string> </key>
<value> <string>A line was too long.</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>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</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>
<item>
<key> <string>width</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>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</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>
<item>
<key> <string>width</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></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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>80</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: \'\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>simulation_state</string> </value> <value> <string>my_workflow_action</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -217,23 +217,7 @@ ...@@ -217,23 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item>
<item>
<key> <string>editable_expression</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable_permission</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>editable_role</string> </key>
<value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -249,27 +233,19 @@ ...@@ -249,27 +233,19 @@
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>not_viewable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>read_only</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>State</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -279,22 +255,6 @@ ...@@ -279,22 +255,6 @@
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>viewable_expression</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>viewable_permission</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>viewable_role</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -319,7 +279,7 @@ ...@@ -319,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.portal_workflow.getInfoFor(here, \'simulation_state\')</string> </value> <value> <string>request/workflow_action | nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>ListField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_profit_and_loss_account</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</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>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</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</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>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</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></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</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/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Profit And Loss Account</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/AccountingTransactionLine_getNodeItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -91,12 +91,12 @@ ...@@ -91,12 +91,12 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>listbox_source_payment</string>
<string>listbox_resource</string> <string>listbox_resource</string>
<string>listbox_source</string> <string>listbox_source_section_title</string>
<string>listbox_source_debit</string> <string>listbox_destination</string>
<string>listbox_source_credit</string> <string>listbox_destination_credit</string>
<string>listbox_destination_section_title</string> <string>listbox_destination_debit</string>
<string>listbox_destination_payment</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -104,8 +104,10 @@ ...@@ -104,8 +104,10 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_source_section</string> <string>my_destination_section</string>
<string>my_destination_reference</string>
<string>my_title</string> <string>my_title</string>
<string>my_resource</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -115,7 +117,8 @@ ...@@ -115,7 +117,8 @@
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>my_description</string> <string>my_description</string>
<string>simulation_state</string> <string>my_translated_portal_type</string>
<string>my_translated_simulation_state_title</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -338,15 +338,15 @@ ...@@ -338,15 +338,15 @@
<string>ID</string> <string>ID</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source</string> <string>destination</string>
<string>Account</string> <string>Account</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_payment</string> <string>destination_payment</string>
<string>Bank Account</string> <string>Bank Account</string>
</tuple> </tuple>
<tuple> <tuple>
<string>getDestinationSectionTitle</string> <string>source_section_title</string>
<string>Third Party</string> <string>Third Party</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -354,11 +354,11 @@ ...@@ -354,11 +354,11 @@
<string>Currency</string> <string>Currency</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_debit</string> <string>destination_debit</string>
<string>Debit</string> <string>Debit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_credit</string> <string>destination_credit</string>
<string>Credit</string> <string>Credit</string>
</tuple> </tuple>
</list> </list>
...@@ -405,11 +405,11 @@ ...@@ -405,11 +405,11 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>source</string> <string>destination</string>
<string>Account</string> <string>Account</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_payment</string> <string>destination_payment</string>
<string>Bank Account</string> <string>Bank Account</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -417,11 +417,11 @@ ...@@ -417,11 +417,11 @@
<string>Currency</string> <string>Currency</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_debit</string> <string>destination_debit</string>
<string>Debit</string> <string>Debit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_credit</string> <string>destination_credit</string>
<string>Credit</string> <string>Credit</string>
</tuple> </tuple>
</list> </list>
...@@ -454,12 +454,7 @@ ...@@ -454,12 +454,7 @@
<item> <item>
<key> <string>global_attributes</string> </key> <key> <string>global_attributes</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>source_section</string>
<string>source_section</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -468,7 +463,7 @@ ...@@ -468,7 +463,7 @@
</item> </item>
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <int>20</int> </value> <value> <int>30</int> </value>
</item> </item>
<item> <item>
<key> <string>list_action</string> </key> <key> <string>list_action</string> </key>
...@@ -552,12 +547,23 @@ ...@@ -552,12 +547,23 @@
<item> <item>
<key> <string>stat_columns</string> </key> <key> <string>stat_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>destination_debit</string>
<string>AccountingTransactionLine_statSourceCredit</string>
</tuple>
<tuple>
<string>destination_credit</string>
<string>AccountingTransactionLine_statSourceDebit</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>stat_method</string> </key> <key> <string>stat_method</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -610,4 +616,23 @@ ...@@ -610,4 +616,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>AccountingTransaction_getInvoiceTransactionLineList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_source</string> </value> <value> <string>listbox_destination</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_source</string> </value> <value> <string>Destination</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_source_debit</string> </value> <value> <string>listbox_destination_credit</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_source_debit</string> </value> <value> <string>Credit</string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_source_credit</string> </value> <value> <string>listbox_destination_debit</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_source_credit</string> </value> <value> <string>Debit</string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_source_payment</string> </value> <value> <string>listbox_destination_payment</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_source_payment</string> </value> <value> <string>Payment</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getObject().AccountingTransaction_getSourcePaymentItemList()</string> </value> <value> <string>python: cell.getObject().AccountingTransaction_getDestinationPaymentItemList()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_resource</string> </value> <value> <string>Currency</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_destination_section_title</string> </value> <value> <string>listbox_source_section_title</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_destination_section_title</string> </value> <value> <string>Third Party</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_destination_reference</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>too_long</string> </key>
<value> <string>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Transaction Reference</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </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>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_source_section</string> </value> <value> <string>my_destination_section</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>ListField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_resource</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</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>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</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</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>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</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></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</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/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Currency</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.CurrencyModule_getCurrencyItemList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_translated_portal_type</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>too_long</string> </key>
<value> <string>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Transaction Type</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_translated_simulation_state_title</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>too_long</string> </key>
<value> <string>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</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></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </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>
...@@ -71,48 +71,43 @@ ...@@ -71,48 +71,43 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
\n \n
closing_period = state_change[\'object\']\n closing_period = state_change[\'object\']\n
portal = closing_period.getPortalObject()\n portal = closing_period.getPortalObject()\n
N_ = portal.Base_translateString\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
valid_states = [\'planned\', \'confirmed\', \'delivered\']\n valid_state_list = [\'started\', \'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 start_date > stop_date :\n if start_date > stop_date:\n
raise ValidationFailed, N_("Start Date is After Stop Date")\n raise ValidationFailed, N_("Start Date is After Stop Date")\n
\n \n
period_list = closing_period.getParentValue().searchFolder(\n period_list = closing_period.getParentValue().searchFolder(\n
simulation_state = valid_states,\n simulation_state=valid_state_list,\n
sort_on = [(\'delivery.start_date\', \'asc\')],\n sort_on=[(\'delivery.start_date\', \'asc\')],\n
portal_type = \'Accounting Period\')\n portal_type=\'Accounting Period\')\n
\n \n
for period in period_list :\n for period in period_list:\n
period = period.getObject()\n period = period.getObject()\n
portal.log("AccountingPeriod_CheckDates", "id:%s start:%s stop:%s" % (\n if period.getSimulationState() in valid_state_list:\n
period.getId(),\n if start_date <= period.getStopDate():\n
period.getStartDate(),\n
period.getStopDate()))\n
if period.getSimulationState() in valid_states :\n
if start_date <= period.getStopDate() :\n
raise ValidationFailed, N_(\n raise ValidationFailed, N_(\n
"${date} is already in an opened accounting period",\n "${date} is already in an opened accounting period",\n
mapping = {\'date\': period.Base_FormatDate(start_date)})\n mapping={\'date\': start_date})\n
\n \n
if len(period_list) > 1 :\n if len(period_list) > 1:\n
last_period = period_list[-1].getObject()\n last_period = period_list[-1].getObject()\n
if last_period.getId() == closing_period.getId() :\n if last_period.getId() == closing_period.getId():\n
last_period = period_list[-2].getObject()\n last_period = period_list[-2].getObject()\n
if (start_date - last_period.getStopDate()) > 1:\n if (start_date - last_period.getStopDate()) > 1:\n
raise ValidationFailed, N_(\n raise ValidationFailed, N_(\n
"Last opened period ends on ${last_openned_date},"+\n "Last opened period ends on ${last_openned_date},"+\n
" this period starts on ${this_period_start_date}."+\n " this period starts on ${this_period_start_date}."+\n
" Accounting Periods must be consecutive.",\n " Accounting Periods must be consecutive.",\n
mapping = { \'last_openned_date\' :\n mapping = { \'last_openned_date\': last_period.getStopDate(),\n
period.Base_FormatDate(last_period.getStopDate()),\n \'this_period_start_date\': start_date } )\n
\'this_period_start_date\' :\n
period.Base_FormatDate(start_date) } )\n
]]></string> </value> ]]></string> </value>
...@@ -160,12 +155,14 @@ if len(period_list) > 1 :\n ...@@ -160,12 +155,14 @@ if len(period_list) > 1 :\n
<string>state_change</string> <string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string> <string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>closing_period</string> <string>closing_period</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>N_</string>
<string>valid_states</string> <string>valid_state_list</string>
<string>start_date</string> <string>start_date</string>
<string>stop_date</string> <string>stop_date</string>
<string>period_list</string> <string>period_list</string>
...@@ -189,7 +186,7 @@ if len(period_list) > 1 :\n ...@@ -189,7 +186,7 @@ if len(period_list) > 1 :\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingPeriod_CheckDates</string> </value> <value> <string>checkDates</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,43 +68,41 @@ ...@@ -68,43 +68,41 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
\n \n
closing_period = state_change[\'object\']\n period = state_change[\'object\']\n
portal = closing_period.getPortalObject()\n portal = period.getPortalObject()\n
N_ = portal.Base_translateString\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
accounting_module = portal.accounting_module\n
valid_states = [\'cancelled\', \'stopped\']\n
\n \n
start_date = closing_period.getStartDate()\n
stop_date = closing_period.getStopDate()\n
\n \n
search_params = { \'delivery.start_date\' : \'>= %s\' % start_date,\n valid_simulation_state_list = [\'cancelled\', \'delivered\', \'delivered\']\n
\'delivery.stop_date\' : \'<= %s\' % stop_date,\n all_state_list = [x[1] for x in\n
\'simulation_state\' : \'stopped\' }\n portal.Base_getTranslatedWorkflowStateItemList(wf_id=\'accounting_workflow\')]\n
transaction_list = accounting_module.searchFolder( **search_params )\n invalid_simulation_state_list = [state for state in all_state_list\n
if state not in valid_simulation_state_list]\n
\n \n
comment=N_("Closing period ${period_title}",\n section_uid = period.getParentUid()\n
mapping={\'period_title\': unicode(closing_period.getTitle(), \'utf8\')})\n search_params = {\n
\'delivery.start_date\': dict(query=period.getStartDate(),\n
range=\'min\'),\n
\'delivery.stop_date\': dict(query=period.getStopDate(),\n
range=\'ngt\'),\n
\'simulation_state\': invalid_simulation_state_list,\n
\'portal_type\': portal.getPortalAccountingTransactionTypeList(),\n
\'query\': ComplexQuery(Query(source_section_uid=section_uid),\n
Query(destination_section_uid=section_uid),\n
operator=\'OR\')\n
}\n
\n \n
section_uid = closing_period.getParentValue().getUid()\n transaction_list = portal.portal_catalog.searchResults(**search_params)\n
for transaction in transaction_list :\n if transaction_list:\n
transaction = transaction.getObject()\n raise ValidationFailed, N_(\n
# FIXME: this approach is not compatible with categories as sections.\n "All Accounting Transactions for this organisation during the period have"\n
if transaction.getSourceSectionUid() == section_uid or \\\n " to be closed first")\n
transaction.getDestinationSectionUid() == section_uid :\n </string> </value>
transaction.activate().AccountingTransaction_closeByAccountingPeriod(\n
comment = comment, closing_period_path = closing_period.getPath() )\n
\n
# if a transaction validation fails, it puts the Closing Period object back to confirmed state\n
closing_period.activate( \n
after_method_id = [\'AccountingTransaction_closeByAccountingPeriod\']\n
).deliver()\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -149,23 +147,29 @@ closing_period.activate( \n ...@@ -149,23 +147,29 @@ closing_period.activate( \n
<string>state_change</string> <string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string> <string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>ComplexQuery</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>closing_period</string> <string>period</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>N_</string>
<string>accounting_module</string> <string>valid_simulation_state_list</string>
<string>valid_states</string> <string>append</string>
<string>start_date</string> <string>$append0</string>
<string>stop_date</string> <string>_getiter_</string>
<string>x</string>
<string>all_state_list</string>
<string>state</string>
<string>invalid_simulation_state_list</string>
<string>section_uid</string>
<string>dict</string>
<string>search_params</string> <string>search_params</string>
<string>_apply_</string> <string>_apply_</string>
<string>transaction_list</string> <string>transaction_list</string>
<string>unicode</string>
<string>comment</string>
<string>section_uid</string>
<string>_getiter_</string>
<string>transaction</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -182,7 +186,7 @@ closing_period.activate( \n ...@@ -182,7 +186,7 @@ closing_period.activate( \n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingPeriod_DeliverTransactions</string> </value> <value> <string>checkTransactionsState</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,25 +68,17 @@ ...@@ -68,25 +68,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Deliver the transaction and \'notify\' the closing_period on failure."""\n <value> <string>"""Create a balance transaction\n
"""\n
from DateTime import DateTime\n
\n \n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n accounting_period = sci[\'object\']\n
N_ = context.Base_translateString\n portal = accounting_period.getPortalObject()\n
profit_and_loss_account = portal.portal_workflow.getInfoFor(\n
accounting_period, \'profit_and_loss_account\')\n
\n \n
try : \n accounting_period.AccountingPeriod_createBalanceTransaction(\n
context.portal_workflow.doActionFor( context,\n profit_and_loss_account=profit_and_loss_account)\n
\'deliver_action\', \n
skip_period_validation = 1,\n
comment=comment )\n
except ValidationFailed, message :\n
closing_period = context.getPortalObject().restrictedTraverse(closing_period_path)\n
if closing_period.getSimulationState() != \'confirmed\' :\n
closing_period.failClosing()\n
closing_period.portal_workflow.doActionFor( closing_period,\n
\'edit_action\', \n
comment=N_(\'unable to deliver ${transaction_path} : ${error_message}\',\n
mapping={\'transaction_path\':context.getPath(),\n
\'error_message\': unicode(str(message), \'utf8\') } ))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -101,9 +93,15 @@ except ValidationFailed, message :\n ...@@ -101,9 +93,15 @@ except ValidationFailed, message :\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>comment, closing_period_path, **kw</string> </value> <value> <string>sci</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -123,24 +121,19 @@ except ValidationFailed, message :\n ...@@ -123,24 +121,19 @@ except ValidationFailed, message :\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>comment</string> <string>sci</string>
<string>closing_period_path</string> <string>DateTime</string>
<string>kw</string> <string>_getitem_</string>
<string>Products.DCWorkflow.DCWorkflow</string> <string>accounting_period</string>
<string>ValidationFailed</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>portal</string>
<string>N_</string> <string>profit_and_loss_account</string>
<string>message</string>
<string>closing_period</string>
<string>unicode</string>
<string>str</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -157,7 +150,7 @@ except ValidationFailed, message :\n ...@@ -157,7 +150,7 @@ except ValidationFailed, message :\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingTransaction_closeByAccountingPeriod</string> </value> <value> <string>createBalanceTransaction</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>The Accounting Period is cancelled, a new one should be defined.</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
...@@ -77,9 +83,7 @@ ...@@ -77,9 +83,7 @@
<item> <item>
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<tuple> <tuple/>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<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>Closing is the state used when the activity of delivering transaction happens.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>closing</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Closing</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>deliver</string>
<string>fail_closing</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>The Accounting Period is closed.\r\n
\r\n
It is no longer possible to add accounting transactions in this period. A balance transaction has been created.</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>The Accounting Period is not openned yet.</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -42,11 +42,17 @@ ...@@ -42,11 +42,17 @@
<tuple> <tuple>
<string>cancel</string> <string>cancel</string>
<string>cancel_action</string> <string>cancel_action</string>
<string>plan</string> <string>start</string>
<string>plan_action</string> <string>start_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -18,13 +18,21 @@ ...@@ -18,13 +18,21 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>The Accounting Period is openned.\r\n
\r\n
It is therefore possible to post accounting accounting transactions with dates during this period.</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>planned</string> </value> <value> <string>started</string> </value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>permission_roles</string> </key>
...@@ -34,14 +42,14 @@ ...@@ -34,14 +42,14 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Open</string> </value> <value> <string>Openned</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>confirm</string> <string>stop</string>
<string>confirm_action</string> <string>stop_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -78,7 +86,6 @@ ...@@ -78,7 +86,6 @@
<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>
</tuple> </tuple>
</value> </value>
...@@ -97,9 +104,7 @@ ...@@ -97,9 +104,7 @@
<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>Member</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -18,13 +18,20 @@ ...@@ -18,13 +18,20 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>The Accounting Period is temporary closed, but can be openned back.\r\n
In this state it is not possible to post transactions during this period.</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>confirmed</string> </value> <value> <string>stopped</string> </value>
</item> </item>
<item> <item>
<key> <string>permission_roles</string> </key> <key> <string>permission_roles</string> </key>
...@@ -34,16 +41,16 @@ ...@@ -34,16 +41,16 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Temporally Closed Accounting Period</string> </value> <value> <string>Temporary Closed</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>close</string> <string>deliver</string>
<string>close_action</string> <string>deliver_action</string>
<string>plan</string> <string>restart_action</string>
<string>reopen_action</string> <string>start</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -80,7 +87,6 @@ ...@@ -80,7 +87,6 @@
<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>
</tuple> </tuple>
</value> </value>
...@@ -99,9 +105,7 @@ ...@@ -99,9 +105,7 @@
<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>Member</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
</value> </value>
......
<?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>AccountingPeriod_DeliverTransactions</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>close</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>closing</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>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string></string> </value> <value> <string>createBalanceTransaction</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
...@@ -18,6 +18,12 @@ ...@@ -18,6 +18,12 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value> <value> <string>workflow</string> </value>
...@@ -28,25 +34,25 @@ ...@@ -28,25 +34,25 @@
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=close_action</string> </value> <value> <string>%(content_url)s/AccountingPeriod_viewDeliverWorkflowActionDialog?workflow_action=deliver_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string>close</string> </value> <value> <string>deliver</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>Closing accounting period is made in an activity. if it fails, the Accounting Period object remains in confirmed state, otherwise it goes to delivered state, depending on the result of passing workflow transitions.</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>close_action</string> </value> <value> <string>deliver_action</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
...@@ -54,7 +60,7 @@ ...@@ -54,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string></string> </value> <value> <string>checkTransactionsState</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -64,6 +70,12 @@ ...@@ -64,6 +70,12 @@
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </item>
<item>
<key> <string>var_exprs</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
...@@ -71,8 +83,8 @@ ...@@ -71,8 +83,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.DCWorkflow.Guard</string> <string>Persistence</string>
<string>Guard</string> <string>PersistentMapping</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -80,15 +92,38 @@ ...@@ -80,15 +92,38 @@
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>roles</string> </key> <key> <string>_container</string> </key>
<value> <value>
<tuple> <dictionary>
<string>Assignor</string> <item>
<string>Manager</string> <key> <string>profit_and_loss_account</string> </key>
</tuple> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>kwargs/profit_and_loss_account | nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </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></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>fail_closing</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>
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=reopen_action</string> </value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=restart_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string>plan</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>reopen_action</string> </value> <value> <string>restart_action</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
<value> <string></string> </value> <value> <string>started</string> </value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>confirm</string> </value> <value> <string>start</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
<value> <string>confirmed</string> </value> <value> <string>started</string> </value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=plan_action</string> </value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=start_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string>plan</string> </value> <value> <string>start</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>plan_action</string> </value> <value> <string>start_action</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</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>AccountingPeriod_CheckDates</string> </value> <value> <string>checkDates</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>plan</string> </value> <value> <string>stop</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
<value> <string>planned</string> </value> <value> <string>stopped</string> </value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
......
...@@ -24,15 +24,15 @@ ...@@ -24,15 +24,15 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Temporally Close Accounting Period</string> </value> <value> <string>Temporary Close Accounting Period</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=confirm_action</string> </value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=stop_action</string> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <string>confirm</string> </value> <value> <string>stop</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>confirm_action</string> </value> <value> <string>stop_action</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</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>AccountingPeriod_CheckTransactionsState</string> </value> <value> <string>checkTransactionsState</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -18,15 +18,21 @@ ...@@ -18,15 +18,21 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>default_expr</string> </key> <key> <string>default_expr</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>default_value</string> </key> <key> <string>default_value</string> </key>
<value> <string>Associate</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -38,11 +44,11 @@ ...@@ -38,11 +44,11 @@
</item> </item>
<item> <item>
<key> <string>for_status</string> </key> <key> <string>for_status</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>zz</string> </value> <value> <string>profit_and_loss_account</string> </value>
</item> </item>
<item> <item>
<key> <string>info_guard</string> </key> <key> <string>info_guard</string> </key>
...@@ -52,26 +58,7 @@ ...@@ -52,26 +58,7 @@
</item> </item>
<item> <item>
<key> <string>update_always</string> </key> <key> <string>update_always</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:[\'Order Assignee\', \'Invoice Assignee\']</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -79,7 +79,7 @@ from Products.ERP5Type.Message import Message\n ...@@ -79,7 +79,7 @@ from Products.ERP5Type.Message import Message\n
transaction = state_change[\'object\']\n transaction = state_change[\'object\']\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
\n \n
# do we have to check transaction is in openned periods ?\n # do we have to check transaction is in openned periods ? \n
skip_period_validation = state_change[\'kwargs\'].get(\n skip_period_validation = state_change[\'kwargs\'].get(\n
\'skip_period_validation\', 0)\n \'skip_period_validation\', 0)\n
transition = state_change[\'transition\']\n transition = state_change[\'transition\']\n
...@@ -94,36 +94,34 @@ check_destination = (transaction.getPortalType() in\n ...@@ -94,36 +94,34 @@ check_destination = (transaction.getPortalType() in\n
source_section = transaction.getSourceSectionValue(\n source_section = transaction.getSourceSectionValue(\n
portal_type=[\'Organisation\', \'Person\'])\n portal_type=[\'Organisation\', \'Person\'])\n
if source_section is None:\n if source_section is None:\n
raise ValidationFailed(\'Source Section is not Defined.\')\n raise ValidationFailed(N_(\'Source Section is not Defined.\'))\n
\n \n
destination_section = transaction.getDestinationSectionValue(\n destination_section = transaction.getDestinationSectionValue(\n
portal_type=[\'Organisation\', \'Person\'])\n portal_type=[\'Organisation\', \'Person\'])\n
# if it\'s not an invoice, then we can validate without destination\n # if it\'s not an invoice, then we can validate without destination\n
if destination_section is None and check_destination :\n if destination_section is None and check_destination :\n
raise ValidationFailed(\'Destination Section is not Defined.\')\n raise ValidationFailed(N_(\'Destination Section is not Defined.\'))\n
\n \n
currency = transaction.getResource(portal_type = \'Currency\')\n currency = transaction.getResource(portal_type = \'Currency\')\n
if not currency :\n if not currency :\n
raise ValidationFailed(\'Currency is not Defined.\')\n raise ValidationFailed(N_(\'Currency is not Defined.\'))\n
\n \n
# XXX manually default start date to stop date\n # XXX manually default start date to stop date\n
if not transaction.getStartDate() and transaction.getStopDate():\n if not transaction.getStartDate() and transaction.getStopDate():\n
transaction.setStartDate(transaction.getStopDate())\n transaction.setStartDate(transaction.getStopDate())\n
\n \n
if not transaction.getStartDate() :\n if not transaction.getStartDate() :\n
raise ValidationFailed(\'Date is not Defined\')\n raise ValidationFailed(N_(\'Date is not Defined\'))\n
else:\n else:\n
if not skip_period_validation :\n if not skip_period_validation :\n
valid_date = False\n valid_date = False\n
# check the date is in an opened period\n # check the date is in an opened period\n
transaction_date = DateTime( transaction.getStartDate().year(),\n transaction_date = transaction.getStartDate().earliestTime()\n
transaction.getStartDate().month(),\n \n
transaction.getStartDate().day(),\n
# we don\'t care about hour:minutes\n
)\n
openned_accounting_period_list = source_section.searchFolder(\n openned_accounting_period_list = source_section.searchFolder(\n
portal_type = "Accounting Period",\n portal_type="Accounting Period",\n
simulation_state = "planned")\n # planned is for b/w compatibility\n
simulation_state=("planned", \'started\'))\n
if len(openned_accounting_period_list) == 0 :\n if len(openned_accounting_period_list) == 0 :\n
# if the entity doesn\'t have any accounting period, we can\n # if the entity doesn\'t have any accounting period, we can\n
# consider that they do not want to use accounting periods or\n # consider that they do not want to use accounting periods or\n
...@@ -134,19 +132,15 @@ else:\n ...@@ -134,19 +132,15 @@ else:\n
if apd.getStartDate().Date() <= transaction_date.Date() <= apd.getStopDate().Date():\n if apd.getStartDate().Date() <= transaction_date.Date() <= apd.getStopDate().Date():\n
valid_date = True\n valid_date = True\n
if not valid_date :\n if not valid_date :\n
raise ValidationFailed("Date is not in an openned Accounting Period "\n raise ValidationFailed(N_("Date is not in an opened Accounting Period "\n
"for source section")\n "for source section"))\n
# do the same for destination section \n # do the same for destination section \n
if check_destination :\n if check_destination :\n
valid_date = False\n valid_date = False\n
transaction_date = DateTime( transaction.getStopDate().year(),\n transaction_date = transaction.getStopDate().earliestTime()\n
transaction.getStopDate().month(),\n
transaction.getStopDate().day(),\n
# we don\'t care about hour:minutes\n
)\n
openned_accounting_period_list = destination_section.searchFolder(\n openned_accounting_period_list = destination_section.searchFolder(\n
portal_type = "Accounting Period",\n portal_type = "Accounting Period",\n
simulation_state = "planned")\n simulation_state = (\'planned\', \'started\'))\n
if len(openned_accounting_period_list) == 0:\n if len(openned_accounting_period_list) == 0:\n
valid_date = True\n valid_date = True\n
for apd in openned_accounting_period_list:\n for apd in openned_accounting_period_list:\n
...@@ -154,8 +148,8 @@ else:\n ...@@ -154,8 +148,8 @@ else:\n
if apd.getStartDate().Date() <= transaction_date.Date() <= apd.getStopDate().Date():\n if apd.getStartDate().Date() <= transaction_date.Date() <= apd.getStopDate().Date():\n
valid_date = True\n valid_date = True\n
if not valid_date :\n if not valid_date :\n
raise ValidationFailed("Date is not in an openned Accounting Period "\n raise ValidationFailed(N_("Date is not in an opened Accounting Period "\n
"for destination section")\n "for destination section"))\n
]]></string> </value> ]]></string> </value>
...@@ -236,7 +230,6 @@ else:\n ...@@ -236,7 +230,6 @@ else:\n
<string>currency</string> <string>currency</string>
<string>False</string> <string>False</string>
<string>valid_date</string> <string>valid_date</string>
<string>DateTime</string>
<string>transaction_date</string> <string>transaction_date</string>
<string>openned_accounting_period_list</string> <string>openned_accounting_period_list</string>
<string>len</string> <string>len</string>
......
380 386
\ No newline at end of file \ No newline at end of file
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