Commit a7a7df32 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Update 'rafael' branch to use new changes on unit tests and check that the...

Update 'rafael' branch to use new changes on unit tests and check that the last merge did not add random failures on functional tests
parents 85b68188 4c7e68d3
<key_list>
<key>accounting_transaction.operation_date</key>
<key>operation_date</key>
</key_list>
\ No newline at end of file
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z0_drop_accounting_transaction</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>DROP TABLE IF EXISTS accounting_transaction\n
</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_uncatalog_object" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: context.isAccountingTransactionType()</value>
</item>
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z0_uncatalog_accounting_transaction</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
DELETE FROM accounting_transaction WHERE <dtml-sqltest uid op=eq type=int>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: context.isAccountingTransactionType()</value>
</item>
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getSourceSectionUid\r\n
getDestinationSectionUid\r\n
getResourceUid\r\n
getSourceProjectUid\r\n
getDestinationProjectUid\r\n
getSourcePaymentUid\r\n
getDestinationPaymentUid\r\n
getTitle\r\n
getReference\r\n
getSourceReference\r\n
getDestinationReference\r\n
getStartDate\r\n
getStopDate\r\n
InternalInvoiceTransaction_statInternalTransactionLineList\r\n
</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_catalog_accounting_transaction_list</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
DELETE FROM\n
accounting_transaction\n
WHERE\n
<dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n
;\n
\n
<dtml-var "\'\\0\'">\n
\n
<dtml-let row_list="[]" uid_dict="{}">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "getDestinationSectionUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n
uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getDestinationSectionUid[loop_item],\n
getSourceSectionUid[loop_item],\n
getResourceUid[loop_item],\n
getDestinationProjectUid[loop_item], \n
getDestinationPaymentUid[loop_item],\n
getTitle[loop_item], \n
getReference[loop_item], \n
getDestinationReference[loop_item], \n
getStopDate[loop_item], \n
InternalInvoiceTransaction_statInternalTransactionLineList[loop_item][0][\'destination_asset_debit\'], \n
InternalInvoiceTransaction_statInternalTransactionLineList[loop_item][0][\'destination_asset_credit\'], \n
])">\n
</dtml-if>\n
<dtml-if expr="True">\n
<dtml-comment>\n
for now, unconditionanly catalog source, to always have at\n
least one line, but is it needed ?\n
</dtml-comment>\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n
uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getSourceSectionUid[loop_item],\n
getDestinationSectionUid[loop_item],\n
getResourceUid[loop_item],\n
getSourceProjectUid[loop_item], \n
getSourcePaymentUid[loop_item],\n
getTitle[loop_item], \n
getReference[loop_item], \n
getSourceReference[loop_item], \n
getStartDate[loop_item], \n
InternalInvoiceTransaction_statInternalTransactionLineList[loop_item][0][\'source_asset_debit\'], \n
InternalInvoiceTransaction_statInternalTransactionLineList[loop_item][0][\'source_asset_credit\'], \n
])">\n
</dtml-if>\n
</dtml-in> \n
\n
<dtml-if "row_list">\n
INSERT INTO\n
accounting_transaction\n
VALUES\n
<dtml-in prefix="row" expr="row_list">\n
(\n
<dtml-sqlvar expr="row_item[0]" type="int">,\n
<dtml-sqlvar expr="row_item[1]" type="int">,\n
<dtml-sqlvar expr="row_item[2]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[3]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="string" optional>, \n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="float" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_col</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_create_accounting_transaction</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string>CREATE TABLE `accounting_transaction` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
\n
`section_uid` BIGINT UNSIGNED,\n
`mirror_section_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
\n
`project_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n
\n
`accounting_transaction_title` VARCHAR(255),\n
`reference` VARCHAR(255),\n
`specific_reference` VARCHAR(255),\n
\n
`operation_date` datetime default NULL,\n
\n
`total_debit` real,\n
`total_credit` real,\n
\n
PRIMARY KEY (`uid`, `order_id`),\n
KEY `section_uid` (`section_uid`)\n
-- TODO: keys\n
) TYPE=InnoDB\n
</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_accounting_transaction_mirror_section</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
accounting_transaction.mirror_section_uid = <dtml-var table_0>.uid\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_accounting_transaction_payment</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
accounting_transaction.payment_uid = <dtml-var table_0>.uid\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_accounting_transaction_project</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
accounting_transaction.project_uid = <dtml-var table_0>.uid\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_accounting_transaction_stock_line</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
accounting_transaction.uid = <dtml-var table_0>.explanation_uid\n
AND <dtml-var table_0>.uid = <dtml-var table_1>.uid
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<key_list>
<key>accounting_transaction_line_node_uid | movement,stock/node_uid/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_line_total_price | movement,stock/total_price/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section</key>
<key>accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment</key>
<key>accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project</key>
</key_list>
\ No newline at end of file
<key_list>
<key>accounting_transaction</key>
</key_list>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_accounting_alternate_catalog</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
getUid = portal.portal_categories.getCategoryUid\n
\n
section_category = params.pop(\'section_category\', None)\n
section_category_strict = params.pop(\'section_category_strict\', None)\n
params[\'accounting_transaction.section_uid\'] = \'\'\n
if section_category:\n
params[\'accounting_transaction.section_uid\'] = context.Base_getSectionUidListForSectionCategory(\n
section_category, strict_membership=section_category_strict)\n
\n
# rewrite payment_mode_relative_url to uid\n
payment_mode_relative_url = params.pop(\'payment_mode_relative_url\', None)\n
if payment_mode_relative_url:\n
params[\'default_payment_mode_uid\'] = \\\n
portal.portal_categories.payment_mode.getCategoryUid(payment_mode_relative_url)\n
\n
# rewrite currency to uid\n
resource = params.pop(\'resource\', None)\n
if resource:\n
params[\'accounting_transaction.resource_uid\'] = getUid(resource)\n
\n
\n
# XXX wrong name compat\n
# TODO: make it better on search dialog\n
node_list = params.pop(\'node\', None)\n
if node_list:\n
params[\'accounting_transaction_line_node_uid\'] = [\n
getUid(node) for node in node_list]\n
\n
entity = params.pop(\'entity\', None)\n
if entity:\n
params[\'accounting_transaction.mirror_section_uid\'] = getUid(entity)\n
\n
if not params.get(\'operation_date\'):\n
params.pop(\'from_date\', None)\n
params.pop(\'to_date\', None)\n
if from_date or to_date:\n
if from_date:\n
if to_date:\n
params[\'operation_date\'] = dict(\n
query=(from_date, to_date),\n
range=\'minngt\')\n
else:\n
params[\'operation_date\'] = dict(\n
query=(from_date, ),\n
range=\'min\')\n
else:\n
params[\'operation_date\'] = dict(\n
query=(to_date, ),\n
range=\'ngt\')\n
\n
amount = params.pop(\'amount\', \'\')\n
if amount not in (None, \'\'):\n
params[\'accounting_transaction_line_total_price\'] = amount\n
else:\n
amount_range_min = params.pop(\'amount_range_min\', None)\n
amount_range_max = params.pop(\'amount_range_max\', None)\n
if amount_range_min or amount_range_max:\n
if amount_range_min:\n
if amount_range_max:\n
params[\'accounting_transaction_line_total_price\'] = dict(\n
query=(amount_range_min, amount_range_max),\n
range=\'minmax\')\n
else:\n
params[\'accounting_transaction_line_total_price\'] = dict(\n
query=(amount_range_min, ),\n
range=\'min\')\n
else:\n
params[\'accounting_transaction_line_total_price\'] = dict(\n
query=(amount_range_max, ),\n
range=\'max\')\n
\n
\n
creation_date_range_min = params.pop(\'creation_date_range_min\', None)\n
creation_date_range_max = params.pop(\'creation_date_range_max\', None)\n
if creation_date_range_min or creation_date_range_max:\n
if creation_date_range_min:\n
if creation_date_range_max:\n
params[\'creation_date\'] = dict(\n
query=(creation_date_range_min, creation_date_range_max),\n
range=\'minmax\')\n
else:\n
params[\'creation_date\'] = dict(\n
query=(creation_date_range_min, ),\n
range=\'min\')\n
else:\n
params[\'creation_date\'] = dict(\n
query=(creation_date_range_max, ),\n
range=\'max\')\n
\n
select_dict = params.get(\'select_dict\') or dict()\n
select_dict.update(dict(total_debit=None,\n
total_credit=None,\n
reference=None,\n
specific_reference=None,\n
project_uid=None,\n
payment_uid=None,\n
mirror_section_uid=None,\n
operation_date=None))\n
\n
params[\'select_dict\'] = select_dict\n
params.setdefault(\'group_by\', (\'uid\',))\n
\n
return context.searchFolder(**params)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>from_date=None, to_date=None, **params</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getAccountingTransactionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<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>action</string> </key>
<value> <string>Base_doSelect</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</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>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_total_credit</string>
<string>listbox_total_debit</string>
<string>listbox_accounting_transaction_mirror_section_title</string>
<string>listbox_accounting_transaction_payment_title</string>
<string>listbox_accounting_transaction_project_title</string>
<string>listbox_operation_date</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_viewAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>AccountingTransactionModule_viewAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</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>Accounting Transactions</string> </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>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>precision</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_total_credit</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Credit</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/total_credit | cell/AccountingTransaction_getTotalCredit</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python:2</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>precision</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_total_debit</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>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Debit</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/total_debit | cell/AccountingTransaction_getTotalDebit</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>request/precision | python:2</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = container.REQUEST\n
mirror_section_title = \'\'\n
try:\n
return request.other[context.mirror_section_uid]\n
except KeyError:\n
if context.mirror_section_uid:\n
mirror_section = context.getPortalObject().portal_catalog.getobject(context.mirror_section_uid)\n
if mirror_section is not None:\n
mirror_section_title = mirror_section.getTitle()\n
\n
request.other[context.mirror_section_uid] = mirror_section_title\n
return mirror_section_title\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Brain_getMirrorSectionTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = container.REQUEST\n
payment_title = \'\'\n
try:\n
return request.other[context.payment_uid]\n
except KeyError:\n
if context.payment_uid:\n
payment = context.getPortalObject().portal_catalog.getobject(context.payment_uid)\n
if payment is not None:\n
payment_title = payment.getTitle()\n
\n
request.other[context.payment_uid] = payment_title\n
return payment_title\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Brain_getPaymentTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = container.REQUEST\n
project_title = \'\'\n
try:\n
return request.other[context.project_uid]\n
except KeyError:\n
if context.project_uid:\n
project = context.getPortalObject().portal_catalog.getobject(context.project_uid)\n
if project is not None:\n
project_title = project.getTitle()\n
\n
request.other[context.project_uid] = project_title\n
return project_title\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Brain_getProjectTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n
total_source_debit = 0\n
total_source_credit = 0\n
total_destination_debit = 0\n
total_destination_credit = 0\n
total_source_asset_debit = 0\n
total_source_asset_credit = 0\n
total_destination_asset_debit = 0\n
total_destination_asset_credit = 0\n
\n
source_section = context.getSourceSection()\n
destination_section = context.getDestinationSection()\n
for line in context.objectValues(\n
portal_type = context.getPortalAccountingMovementTypeList()) :\n
if line.getSource() and line.getSourceSection() == source_section:\n
total_source_debit += line.getSourceDebit()\n
total_source_asset_debit += line.getSourceInventoriatedTotalAssetDebit()\n
total_source_credit += line.getSourceCredit()\n
total_source_asset_credit += line.getSourceInventoriatedTotalAssetCredit()\n
if line.getDestination()\\\n
and line.getDestinationSection() == destination_section:\n
total_destination_debit += line.getDestinationDebit()\n
total_destination_asset_debit += line.getDestinationInventoriatedTotalAssetDebit()\n
total_destination_credit += line.getDestinationCredit()\n
total_destination_asset_credit += line.getDestinationInventoriatedTotalAssetCredit()\n
\n
return [Object(\n
source_debit=total_source_debit,\n
source_credit=total_source_credit,\n
destination_debit=total_destination_debit,\n
destination_credit=total_destination_credit,\n
source_asset_debit=total_source_asset_debit,\n
source_asset_credit=total_source_asset_credit,\n
destination_asset_debit=total_destination_asset_debit,\n
destination_asset_credit=total_destination_asset_credit,)]\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InternalInvoiceTransaction_statInternalTransactionLineList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Alternate catalog implementation of accounting module main view
\ No newline at end of file
operation_date
accounting_transaction.operation_date
\ No newline at end of file
erp5_mysql_innodb/z0_drop_accounting_transaction
erp5_mysql_innodb/z0_uncatalog_accounting_transaction
erp5_mysql_innodb/z_catalog_accounting_transaction_list
erp5_mysql_innodb/z_create_accounting_transaction
erp5_mysql_innodb/z_related_accounting_transaction_mirror_section
erp5_mysql_innodb/z_related_accounting_transaction_payment
erp5_mysql_innodb/z_related_accounting_transaction_project
erp5_mysql_innodb/z_related_accounting_transaction_stock_line
\ No newline at end of file
accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section
accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project
accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment
accounting_transaction_line_node_uid | movement,stock/node_uid/z_related_accounting_transaction_stock_line
accounting_transaction_line_total_price | movement,stock/total_price/z_related_accounting_transaction_stock_line
\ No newline at end of file
erp5_accounting_alternate_catalog
\ No newline at end of file
erp5_accounting_alternate_catalog
\ No newline at end of file
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
import os import os
import transaction
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.backportUnittest import expectedFailure from Products.ERP5Type.tests.backportUnittest import expectedFailure
...@@ -795,7 +794,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -795,7 +794,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
delivery.confirm() delivery.confirm()
delivery.start() delivery.start()
delivery.stop() delivery.stop()
transaction.commit()
self.tic() self.tic()
# inventories of that resource are index in grams # inventories of that resource are index in grams
......
637 638
\ No newline at end of file \ No newline at end of file
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
...@@ -103,6 +104,7 @@ ...@@ -103,6 +104,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
...@@ -100,6 +101,7 @@ ...@@ -100,6 +101,7 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Associate</string>
<string>Auditor</string> <string>Auditor</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
......
10 11
\ No newline at end of file \ No newline at end of file
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>enctype = context[\'enctype\']\n <value> <string>enctype = getattr(context, "enctype")\n
if enctype in (\'\', None):\n if enctype in (\'\', None):\n
return None\n return None\n
return enctype\n return enctype\n
......
...@@ -34,7 +34,6 @@ from AccessControl import Unauthorized ...@@ -34,7 +34,6 @@ from AccessControl import Unauthorized
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.Sequence import Step, Sequence, SequenceList from Products.ERP5Type.tests.Sequence import Step, Sequence, SequenceList
from zLOG import LOG from zLOG import LOG
import transaction
import random import random
import email import email
from email.header import decode_header, make_header from email.header import decode_header, make_header
...@@ -80,7 +79,7 @@ class TestEGovMixin(SecurityTestCase): ...@@ -80,7 +79,7 @@ class TestEGovMixin(SecurityTestCase):
for idx, step in enumerate(self._step_list): for idx, step in enumerate(self._step_list):
step.play(context, sequence=self, quiet=quiet) step.play(context, sequence=self, quiet=quiet)
# commit transaction after each step # commit transaction after each step
transaction.commit() self.commit()
Sequence.play = play Sequence.play = play
def play(self, context, sequence=None, quiet=0): def play(self, context, sequence=None, quiet=0):
...@@ -139,7 +138,6 @@ class TestEGovMixin(SecurityTestCase): ...@@ -139,7 +138,6 @@ class TestEGovMixin(SecurityTestCase):
self.portal.__class__.DeclarationTVA_zGetSIGTASInformation \ self.portal.__class__.DeclarationTVA_zGetSIGTASInformation \
= lambda x,**kw: [] = lambda x,**kw: []
transaction.commit()
self.tic() self.tic()
def beforeTearDown(self): def beforeTearDown(self):
...@@ -148,7 +146,6 @@ class TestEGovMixin(SecurityTestCase): ...@@ -148,7 +146,6 @@ class TestEGovMixin(SecurityTestCase):
# we want to keep some IDs # we want to keep some IDs
module.manage_delObjects([x for x in module.objectIds() module.manage_delObjects([x for x in module.objectIds()
if x not in ('EUR',)]) if x not in ('EUR',)])
transaction.commit()
self.tic() self.tic()
def getUserFolder(self) : def getUserFolder(self) :
...@@ -200,7 +197,6 @@ class TestEGovMixin(SecurityTestCase): ...@@ -200,7 +197,6 @@ class TestEGovMixin(SecurityTestCase):
'group/dgid/di/csf/bf') 'group/dgid/di/csf/bf')
# make this available to catalog # make this available to catalog
transaction.commit()
self.tic() self.tic()
def createOneOrganisation(self, username, role=None, function=None, def createOneOrganisation(self, username, role=None, function=None,
...@@ -232,7 +228,6 @@ class TestEGovMixin(SecurityTestCase): ...@@ -232,7 +228,6 @@ class TestEGovMixin(SecurityTestCase):
role='entreprise/siege') role='entreprise/siege')
# make this available to catalog # make this available to catalog
transaction.commit()
self.tic() self.tic()
def checkRights(self, object_list, security_mapping, username): def checkRights(self, object_list, security_mapping, username):
......
758 759
\ No newline at end of file \ No newline at end of file
...@@ -32,7 +32,7 @@ from Products.CMFCore.utils import getToolByName ...@@ -32,7 +32,7 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.ExternalSource import ExternalSource from Products.ERP5.Document.ExternalSource import ExternalSource
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Cache import getReadOnlyTransactionCache, enableReadOnlyTransactionCache from Products.ERP5Type.Cache import getReadOnlyTransactionCache
# IMAP imports # IMAP imports
import imaplib import imaplib
...@@ -442,18 +442,13 @@ class EmailReader(ExternalSource): ...@@ -442,18 +442,13 @@ class EmailReader(ExternalSource):
Returns the list of folders of the current server Returns the list of folders of the current server
XXX Add read only transaction cache XXX Add read only transaction cache
""" """
enabled = (getReadOnlyTransactionCache(self) is not None) cache = getReadOnlyTransactionCache()
if not enabled:
enableReadOnlyTransactionCache(self)
cache = getReadOnlyTransactionCache(self)
if cache is not None: if cache is not None:
key = ('getMessageFolderList', self) key = ('getMessageFolderList', self)
try: try:
return cache[key] return cache[key]
except KeyError: except KeyError:
pass pass
else:
raise "No Conversion Cache" # XXX - Implement this better
server = self._getMailServer() server = self._getMailServer()
if server is None: return () if server is None: return ()
...@@ -473,18 +468,13 @@ class EmailReader(ExternalSource): ...@@ -473,18 +468,13 @@ class EmailReader(ExternalSource):
break things. An interactor is required to clear break things. An interactor is required to clear
the variable the variable
""" """
enabled = (getReadOnlyTransactionCache(self) is not None) cache = getReadOnlyTransactionCache()
if not enabled:
enableReadOnlyTransactionCache(self)
cache = getReadOnlyTransactionCache(self)
if cache is not None: if cache is not None:
key = ('_getMailServer', self) key = ('_getMailServer', self)
try: try:
return cache[key] return cache[key]
except KeyError: except KeyError:
pass pass
else:
raise "No Conversion Cache" # XXX - Implement this better
# No server defined # No server defined
if not self.getURLServer(): return None if not self.getURLServer(): return None
......
28 29
\ No newline at end of file \ No newline at end of file
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
import transaction
from httplib import OK as HTTP_OK from httplib import OK as HTTP_OK
class TestDiscussionThread(SecurityTestCase): class TestDiscussionThread(SecurityTestCase):
...@@ -109,7 +108,6 @@ class TestDiscussionThread(SecurityTestCase): ...@@ -109,7 +108,6 @@ class TestDiscussionThread(SecurityTestCase):
self.assertUserCanViewDocument('forum_user', post) self.assertUserCanViewDocument('forum_user', post)
self.assertUserCanAccessDocument('forum_user', post) self.assertUserCanAccessDocument('forum_user', post)
transaction.commit()
self.tic() self.tic()
thread_posts = thread.objectValues() thread_posts = thread.objectValues()
...@@ -180,7 +178,7 @@ class TestDiscussionThread(SecurityTestCase): ...@@ -180,7 +178,7 @@ class TestDiscussionThread(SecurityTestCase):
self.assertUserCanPassWorkflowTransition('admin', 'close_action', thread) self.assertUserCanPassWorkflowTransition('admin', 'close_action', thread)
thread.close() thread.close()
transaction.commit() self.commit()
self.assertUserCanViewDocument('admin', thread) self.assertUserCanViewDocument('admin', thread)
self.assertUserCanAccessDocument('admin', thread) self.assertUserCanAccessDocument('admin', thread)
......
3 4
\ No newline at end of file \ No newline at end of file
140 141
\ No newline at end of file \ No newline at end of file
3 4
\ No newline at end of file \ No newline at end of file
5 13
\ No newline at end of file \ No newline at end of file
24 25
\ No newline at end of file \ No newline at end of file
71 72
\ No newline at end of file \ No newline at end of file
31 32
\ No newline at end of file \ No newline at end of file
19 20
\ No newline at end of file \ No newline at end of file
594 595
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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