Commit f76a2fd5 authored by Rafael Monnerat's avatar Rafael Monnerat

Use appropriate id when re-create the currency

This keeps compatibitility with Standard Configurator outcome.
parent 01fb1ccf
...@@ -64,6 +64,7 @@ if currency is None:\n ...@@ -64,6 +64,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'campaign_howto_currency_title\'],\n title=howto_dict[\'campaign_howto_currency_title\'],\n
reference=howto_dict[\'campaign_howto_currency_tag\'],\n reference=howto_dict[\'campaign_howto_currency_tag\'],\n
id=howto_dict[\'campaign_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -64,6 +64,7 @@ if currency is None:\n ...@@ -64,6 +64,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'create_event_howto_currency_title\'],\n title=howto_dict[\'create_event_howto_currency_title\'],\n
reference=howto_dict[\'create_event_howto_currency_tag\'],\n reference=howto_dict[\'create_event_howto_currency_tag\'],\n
id=howto_dict[\'create_event_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -72,6 +72,7 @@ if currency is None:\n ...@@ -72,6 +72,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'incoming_event_howto_currency_title\'],\n title=howto_dict[\'incoming_event_howto_currency_title\'],\n
reference=howto_dict[\'incoming_event_howto_currency_tag\'],\n reference=howto_dict[\'incoming_event_howto_currency_tag\'],\n
id=howto_dict[\'incoming_event_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -71,6 +71,7 @@ if currency is None:\n ...@@ -71,6 +71,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'outgoing_event_howto_currency_title\'],\n title=howto_dict[\'outgoing_event_howto_currency_title\'],\n
reference=howto_dict[\'outgoing_event_howto_currency_tag\'],\n reference=howto_dict[\'outgoing_event_howto_currency_tag\'],\n
id=howto_dict[\'outgoing_event_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -65,6 +65,7 @@ if currency is None:\n ...@@ -65,6 +65,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'post_event_howto_currency_title\'],\n title=howto_dict[\'post_event_howto_currency_title\'],\n
reference=howto_dict[\'post_event_howto_currency_tag\'],\n reference=howto_dict[\'post_event_howto_currency_tag\'],\n
id=howto_dict[\'post_event_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -73,7 +73,7 @@ if context.portal_templates.getInstalledBusinessTemplate("erp5_simulation_test") ...@@ -73,7 +73,7 @@ if context.portal_templates.getInstalledBusinessTemplate("erp5_simulation_test")
business_process.account_credit_path.setSourceValue(context.account_module.receivable)\n business_process.account_credit_path.setSourceValue(context.account_module.receivable)\n
if isTransitionPossible(business_process, \'validate\'):\n if isTransitionPossible(business_process, \'validate\'):\n
business_process.validate()\n business_process.validate()\n
\n
# check if there is already the euro curency on the instance\n # check if there is already the euro curency on the instance\n
currency = context.portal_catalog.getResultValue(portal_type=\'Currency\',\n currency = context.portal_catalog.getResultValue(portal_type=\'Currency\',\n
title=howto_dict[\'sale_howto_currency_title\'])\n title=howto_dict[\'sale_howto_currency_title\'])\n
...@@ -81,6 +81,7 @@ if currency is None:\n ...@@ -81,6 +81,7 @@ if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'sale_howto_currency_title\'],\n title=howto_dict[\'sale_howto_currency_title\'],\n
reference=howto_dict[\'sale_howto_currency_tag\'],\n reference=howto_dict[\'sale_howto_currency_tag\'],\n
id=howto_dict[\'sale_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n base_unit_quantity=0.01)\n
\n \n
if isTransitionPossible(currency, \'validate\'):\n if isTransitionPossible(currency, \'validate\'):\n
......
...@@ -74,7 +74,7 @@ currency = portal.portal_catalog.getResultValue(portal_type=\'Currency\',\n ...@@ -74,7 +74,7 @@ currency = portal.portal_catalog.getResultValue(portal_type=\'Currency\',\n
local_roles=\'Owner\')\n local_roles=\'Owner\')\n
\n \n
if currency is not None:\n if currency is not None:\n
portal.currency_module.manage_delObjects([currency.getId()])\n portal.currency_module.deleteContent(currency.getId())\n
\n \n
return "Clean Ok"\n return "Clean Ok"\n
</string> </value> </string> </value>
......
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