Commit 3d2bf49a authored by Aurel's avatar Aurel

error message must be updated on each transition

fix typo preventing from having a list

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17448 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 78dbca61
...@@ -103,7 +103,7 @@ portal = context.getPortalObject()\n ...@@ -103,7 +103,7 @@ portal = context.getPortalObject()\n
\n \n
vault_url_list = vault\n vault_url_list = vault\n
if same_type(vault, \'a\'):\n if same_type(vault, \'a\'):\n
vault_url_list = [vault]\n vault_url_list = [vault,]\n
\n \n
for vault_url in vault_url_list:\n for vault_url in vault_url_list:\n
vault_dict[vault_url] = 1\n vault_dict[vault_url] = 1\n
...@@ -260,54 +260,19 @@ for vault_inventory in vault_inventory_list:\n ...@@ -260,54 +260,19 @@ for vault_inventory in vault_inventory_list:\n
i = 0\n i = 0\n
#for resource in context.Baobab_sortResourceTitleList(resource_dict.keys()):\n #for resource in context.Baobab_sortResourceTitleList(resource_dict.keys()):\n
for resource in resource_dict.keys():\n for resource in resource_dict.keys():\n
variation_text = resource[1]\n movement = None\n
tmp_dict = {\'resource_relative_url\':resource[0], \'variation_text\':variation_text}\n
for variation in variation_text.split(\'\\n\'):\n
if variation.startswith(\'cash_status\'):\n
tmp_dict[\'cash_status\'] = variation\n
tmp_dict[\'cash_status_title\'] = getTitleFromCategoryUrl(variation)\n
tmp_dict[\'cash_status_translated_title\'] = getTranslatedTitleFromCategoryUrl(variation)\n
elif variation.startswith(\'emission_letter\'):\n
tmp_dict[\'emission_letter\'] = variation\n
tmp_dict[\'emission_letter_title\'] = getTitleFromCategoryUrl(variation)\n
tmp_dict[\'emission_letter_translated_title\'] = getTranslatedTitleFromCategoryUrl(variation)\n
elif variation.startswith(\'variation\'):\n
tmp_dict[\'variation\'] = variation\n
tmp_dict[\'variation_title\'] = getTitleFromCategoryUrl(variation)\n
tmp_dict[\'variation_translated_title\'] = getTranslatedTitleFromCategoryUrl(variation)\n
tmp_dict[\'variation_text_title\'] = \' \'.join(getVariationTitleList(resource[1]))\n
#resource = (vault_inventory.resource_uid, tuple(getVariationTitleList(vault_inventory.variation_text or \'\')))\n
#resource_value = context.portal_catalog.getObject(resource[0])\n
resource_value = portal.restrictedTraverse(resource[0])\n
current_resource_portal_type = resource_value.getPortalType()\n
if current_resource_portal_type not in resource_portal_type:\n
continue\n
if len(resource)==3: # case of history\n if len(resource)==3: # case of history\n
#context.log(\'movement uid before error\',resource[2])\n #context.log(\'movement uid before error\',resource[2])\n
#movement = context.portal_catalog.getObject(resource[2])\n #movement = context.portal_catalog.getObject(resource[2])\n
movement = portal.restrictedTraverse(resource[2])\n movement = resource[2]\n
#context.log(\'CounterModule_getVaultTransactionList\', \'movement = %s\' %movement)\n resource_url = resource[0]\n
explanation_value = movement\n resource_value = portal.restrictedTraverse(resource_url)\n
if getattr(movement,\'getExplanationValue\',None) is not None:\n current_resource_portal_type = resource_value.getPortalType()\n
explanation_value = movement.getExplanationValue()\n if current_resource_portal_type not in resource_portal_type:\n
#context.log(\'CounterModule_getVaultTransactionList\', \'explanation_value = %s\' %explanation_value)\n continue\n
tmp_dict[\'explanation_relative_url\'] = explanation_value.getRelativeUrl()\n variation_text = resource[1]\n
source_reference = explanation_value.getSourceReference() or \'\'\n tmp_dict = context.Base_getResourceInformationDictFromUrlAndVariation(\n
tmp_dict[\'source_reference\'] = source_reference\n resource_url, variation_text, movement=movement)\n
tmp_dict[\'explanation_translated_relative_url\'] = "%s/%s" % \\\n
(explanation_value.getTranslatedPortalType(),source_reference)\n
tmp_dict[\'base_price\'] = resource_value.getBasePrice()\n
tmp_dict[\'resource_title\'] = resource_value.getTitle()\n
tmp_dict[\'resource_id\'] = resource_value.getId()\n
#context.log(\'resource_value\',resource_value.getRelativeUrl())\n
try:\n
tmp_dict[\'resource_translated_title\'] = resource_value.getTranslatedTitle()\n
except KeyError:\n
tmp_dict[\'resource_translated_title\'] = resource_value.getTitle()\n
tmp_dict[\'price_currency_title\'] = resource_value.getPriceCurrencyTitle()\n
tmp_dict[\'price_currency_id\'] = resource_value.getPriceCurrencyId()\n
tmp_dict[\'price_currency\'] = resource_value.getPriceCurrency()\n
tmp_dict[\'resource_portal_type\'] = current_resource_portal_type\n
general_total_price = 0\n general_total_price = 0\n
for vault in vault_dict.keys():\n for vault in vault_dict.keys():\n
try:\n try:\n
...@@ -460,16 +425,14 @@ return repr([x for x in total_inventory_list])\n ...@@ -460,16 +425,14 @@ return repr([x for x in total_inventory_list])\n
<string>excluded_variation</string> <string>excluded_variation</string>
<string>resource</string> <string>resource</string>
<string>i</string> <string>i</string>
<string>tmp_dict</string> <string>movement</string>
<string>resource_url</string>
<string>resource_value</string> <string>resource_value</string>
<string>current_resource_portal_type</string> <string>current_resource_portal_type</string>
<string>movement</string> <string>tmp_dict</string>
<string>explanation_value</string>
<string>getattr</string>
<string>source_reference</string>
<string>KeyError</string>
<string>general_total_price</string> <string>general_total_price</string>
<string>resource_in_vault</string> <string>resource_in_vault</string>
<string>KeyError</string>
<string>round</string> <string>round</string>
<string>sort_base_price</string> <string>sort_base_price</string>
<string>repr</string> <string>repr</string>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</item> </item>
<item> <item>
<key> <string>update_always</string> </key> <key> <string>update_always</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
374 375
\ 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