diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_create_reversal.html.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_create_reversal.html.xml index 9375e709907fa7659b9ffdd302e66258b0ee94d5..235abc9360e856e72f226e5de5b7b5a4c58536b4 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_create_reversal.html.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_create_reversal.html.xml @@ -205,6 +205,11 @@ delivered.\n <td>select_action</td>\n <td>Create Reversal Transaction</td>\n </tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n <tr>\n <td>assertPortalStatusMessage</td>\n <td>Reversal Transaction for * created.</td>\n diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_module_create_reversal.html.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_module_create_reversal.html.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddee404bbae0c00b5c10d40e701e4f51582e6794 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_module_create_reversal.html.xml @@ -0,0 +1,162 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </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> + <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>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html>\n +<head><title>Test for Creating reversal of multiple transactions</title></head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="4">\n +Test for Creating reversal of multiple transactions\n +</td></tr>\n +</thead><tbody tal:define="init_method string:AccountingZuite_createAccountingTransactionList?add_draft_transactions:int=0&transaction_state=delivered">\n +<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n +\n +<!-- Setup {{{ -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/AccountingZuite_markChanged</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>verifyTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_module</td>\n + <td>Accounting</td>\n +</tr>\n +<!-- }}} -->\n +\n +<!-- Select All {{{ -->\n +<tr>\n + <td>clickAndWait</td>\n + <td>//button[@title=\'Show All\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>verifyText</td>\n + <td>listbox_record_number</td>\n + <td>4 record(s)</td>\n +</tr>\n +<!-- }}} -->\n +\n +<!-- select create reversal action {{{ -->\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_action</td>\n + <td>Create Reversal Transactions</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertPortalStatusMessage</td>\n + <td>Reversal creation for 4 on 4 transactions in progress.</td>\n + <td></td>\n +</tr>\n +<!-- }}} -->\n +\n +<!-- Check accounting transactions are created {{{ -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/accounting_module/view</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>//button[@title=\'Show All\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>verifyText</td>\n + <td>listbox_record_number</td>\n + <td>8 record(s)</td>\n +</tr>\n +<!-- }}} -->\n +\n +</tbody></table>\n +</body>\n +</html> <!-- vim: syntax=html foldmethod=marker\n +-->\n + + +]]></string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test_accounting_transaction_module_create_reversal.html</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_purchase_invoice_transaction_create_reversal.html.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_purchase_invoice_transaction_create_reversal.html.xml index 1487cdcfbc7b43aac2612b78df9683acf0492328..dfae11da260254851d93d73f07d8ea6af224c93e 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_purchase_invoice_transaction_create_reversal.html.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_purchase_invoice_transaction_create_reversal.html.xml @@ -221,6 +221,11 @@ delivered.\n <td>select_action</td>\n <td>Create Reversal Transaction</td>\n </tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n <tr>\n <td>assertPortalStatusMessage</td>\n <td>Reversal Transaction for * created.</td>\n diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_sale_invoice_transaction_create_reversal.html.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_sale_invoice_transaction_create_reversal.html.xml index 6c44367e1146e828a6368fde848a42cef8e08868..eff1add5fb4a8351186d0287a696e28b889f08fc 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_sale_invoice_transaction_create_reversal.html.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_sale_invoice_transaction_create_reversal.html.xml @@ -223,6 +223,11 @@ delivered.\n <td>select_action</td>\n <td>Create Reversal Transaction</td>\n </tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr> \n <tr>\n <td>assertPortalStatusMessage</td>\n <td>Reversal Transaction for * created.</td>\n diff --git a/bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.xml b/bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.xml index 576d4962d43f7bd00eefe91ec71410971ef5860a..01e4641cf11c8a94732065215b28fb7b02e8848e 100644 --- a/bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.xml +++ b/bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.xml @@ -184,9 +184,14 @@ for month in range(1, month_count + 1):\n immediate_reindex=immediate_reindex,\n source=getAccountByTitle(\'Stocks\'),\n quantity=-5000)\n + # TODO: "validated" should be renamed to "stopped"\n if transaction_state == \'validated\':\n tr.stop()\n assert tr.getSimulationState() == \'stopped\'\n + elif transaction_state == \'delivered\':\n + tr.stop()\n + tr.deliver()\n + assert tr.getSimulationState() == \'delivered\'\n else:\n # other cases not supported for now\n assert transaction_state == \'draft\'\n @@ -238,6 +243,10 @@ for month in range(1, month_count + 1):\n if transaction_state == \'validated\':\n tr.stop()\n assert tr.getSimulationState() == \'stopped\'\n + elif transaction_state == \'delivered\':\n + tr.stop()\n + tr.deliver()\n + assert tr.getSimulationState() == \'delivered\'\n else:\n # other cases not supported for now\n assert transaction_state == \'draft\'\n @@ -262,9 +271,12 @@ for month in range(1, month_count + 1):\n immediate_reindex=immediate_reindex,\n source=getAccountByTitle(\'Receivable\'),\n quantity=(amount * (1 + vat_rate)))\n - if transaction_state == \'validated\':\n + if transaction_state in (\'validated\', \'delivered\'):\n payment.stop()\n assert payment.getSimulationState() == \'stopped\'\n + if transaction_state == \'delivered\':\n + tr.deliver()\n + assert tr.getSimulationState() == \'delivered\'\n if not keep_grouping_reference:\n for line in payment.getMovementList(\n portal_type=payment.getPortalAccountingMovementTypeList()):\n @@ -307,6 +319,10 @@ for month in range(1, month_count + 1):\n if transaction_state == \'validated\':\n tr.stop()\n assert tr.getSimulationState() == \'stopped\'\n + elif transaction_state == \'delivered\':\n + tr.stop()\n + tr.deliver()\n + assert tr.getSimulationState() == \'delivered\'\n else:\n # other cases not supported for now\n assert transaction_state == \'draft\'\n diff --git a/bt5/erp5_accounting_ui_test/bt/revision b/bt5/erp5_accounting_ui_test/bt/revision index 405e057083f25e684989f485a916596125fdedc0..b854a292176003137b48b2f2eb6267c6c3085c9b 100644 --- a/bt5/erp5_accounting_ui_test/bt/revision +++ b/bt5/erp5_accounting_ui_test/bt/revision @@ -1 +1 @@ -127 \ No newline at end of file +128 \ No newline at end of file