summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/account/static/src/js/reconciliation/tour_reconciliation.js19
-rw-r--r--addons/account/tests/test_reconciliation_widget.py9
2 files changed, 8 insertions, 20 deletions
diff --git a/addons/account/static/src/js/reconciliation/tour_reconciliation.js b/addons/account/static/src/js/reconciliation/tour_reconciliation.js
index c4ea807bab2..ab6efaef113 100644
--- a/addons/account/static/src/js/reconciliation/tour_reconciliation.js
+++ b/addons/account/static/src/js/reconciliation/tour_reconciliation.js
@@ -9,25 +9,6 @@ Tour.register('bank_statement_reconciliation', {
test: true,
// Go to the reconciliation page of the statement: "BNK/2014/001"
}, [
- {
- content: "wait web client",
- extra_trigger: 'body:not(:has(.o_reconciliation))',
- trigger: '.o_web_client',
- run: function () {
- console.log("looking for 'bank_statement_reconciliation' url");
- rpc.query({
- model: 'account.bank.statement',
- method: 'search',
- args: [[['name', '=', 'BNK/2014/001']]], // account in l10n_generic_coa
- }).then(function(ids) {
- var path = "/web?debug=assets#statement_ids=" + ids[0] + "&action=bank_statement_reconciliation_view";
- console.log("'bank_statement_reconciliation' url is: '" + path + "'");
- window.location.href = path;
- }).fail(function () {
- throw new Error("'account.bank.statement' named 'BNK/2014/001' not found");
- });
- },
- },
// Reconciliation of 'SAJ/2018/002'
// Select the 'INV/2018/0002' line and click on reconcile.
diff --git a/addons/account/tests/test_reconciliation_widget.py b/addons/account/tests/test_reconciliation_widget.py
index 9ca8e36c4df..f564b59380d 100644
--- a/addons/account/tests/test_reconciliation_widget.py
+++ b/addons/account/tests/test_reconciliation_widget.py
@@ -1,5 +1,8 @@
+import logging
import odoo.tests
+_logger = logging.getLogger(__name__)
+
@odoo.tests.tagged('post_install', '-at_install')
@odoo.tests.common.at_install(False)
@@ -7,6 +10,10 @@ import odoo.tests
class TestUi(odoo.tests.HttpCase):
def test_01_admin_bank_statement_reconciliation(self):
- self.phantom_js("/web",
+ bank_stmt = self.env['account.bank.statement'].search([('name', '=', 'BNK/2014/001')])
+ if not bank_stmt:
+ _logger.exception('Could not find bank statement BNK/2014/001')
+
+ self.phantom_js("/web#statement_ids=" + str(bank_stmt.id) + "&action=bank_statement_reconciliation_view",
"odoo.__DEBUG__.services['web_tour.tour'].run('bank_statement_reconciliation')",
"odoo.__DEBUG__.services['web_tour.tour'].tours.bank_statement_reconciliation.ready", login="admin")