Commit 34dfe182 authored by Ivan Tyagov's avatar Ivan Tyagov

Use new simulation.

parent 971c0964
...@@ -47,13 +47,6 @@ ...@@ -47,13 +47,6 @@
<thead>\n <thead>\n
<tr><td rowspan="1" colspan="3">How-to Sale Order / Packing List / Invoices / Payment (expected failure)</td></tr>\n <tr><td rowspan="1" colspan="3">How-to Sale Order / Packing List / Invoices / Payment (expected failure)</td></tr>\n
</thead><tbody>\n </thead><tbody>\n
<!--\n
<tr>\n
<td>assertTextPresent</td>\n
<td>SKIP TO RUN THIS TEST UNTIL THIS TEST BE REFACTORED TO USE NEW SIMULATION.</td>\n
<td></td>\n
</tr>\n
-->\n
\n \n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n <span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n \n
...@@ -127,6 +120,11 @@ ...@@ -127,6 +120,11 @@
<td>//select[@name="field_my_delivery_mode"]</td>\n <td>//select[@name="field_my_delivery_mode"]</td>\n
<td>AIR</td>\n <td>AIR</td>\n
</tr>\n </tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_specialise_title"]</td>\n
<td>erp5_default_business_process</td>\n
</tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//input[@name="field_my_destination_section_title"]</td>\n <td>//input[@name="field_my_destination_section_title"]</td>\n
......
...@@ -57,6 +57,12 @@ portal = context.getPortalObject()\n ...@@ -57,6 +57,12 @@ portal = context.getPortalObject()\n
howto_dict = context.Zuite_getHowToInfo()\n howto_dict = context.Zuite_getHowToInfo()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n \n
# validate default business process\n
business_process = context.portal_catalog.getResultValue(portal_type=\'Business Process\',\n
reference=\'erp5_default_business_process\')\n
if isTransitionPossible(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
...@@ -112,10 +118,19 @@ my_organisation.activate(\n ...@@ -112,10 +118,19 @@ my_organisation.activate(\n
my_organisation.getPath(), \'immediateRecusriveReindexObject\', \'immediateReindexObject\')) \\\n my_organisation.getPath(), \'immediateRecusriveReindexObject\', \'immediateReindexObject\')) \\\n
.Organisation_addConditionallyAccountingPeriod()\n .Organisation_addConditionallyAccountingPeriod()\n
\n \n
rule = portal.portal_rules.searchFolder(reference=\'default_order_rule\',\n for rule_reference in (\'default_delivering_rule\',\n
\'default_delivery_rule\',\n
\'default_accounting_transaction_rule\',\n
\'default_trade_model_rule\',\n
\'default_payment_rule\',\n
\'default_order_rule\',\n
\'default_invoice_transaction_rule\',\n
\'default_invoicing_rule\',\n
\'default_invoice_rule\',):\n
rule = portal.portal_rules.searchFolder(reference=rule_reference,\n
sort_on=\'version\',\n sort_on=\'version\',\n
sort_order=\'descending\')[0].getObject()\n sort_order=\'descending\')[0].getObject()\n
if isTransitionPossible(rule, \'validate\'):\n if isTransitionPossible(rule, \'validate\'):\n
rule.validate()\n rule.validate()\n
\n \n
# Clear cache\n # Clear cache\n
......
772 773
\ 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