diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index b43f48eab9e..18fac77f256 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -8,7 +8,7 @@
:
-
+

Invoice Draft Invoice diff --git a/addons/stock/static/tests/route_tour.js b/addons/stock/static/tests/route_tour.js new file mode 100644 index 00000000000..e75695a5f69 --- /dev/null +++ b/addons/stock/static/tests/route_tour.js @@ -0,0 +1,56 @@ +odoo.define('stock.tour', function (require) { +'use strict'; + +var tour = require('web_tour.tour'); + +tour.register('stock', { + test: true, + url: '/web?debug=assets#action=stock.action_stock_config_settings', + }, + [ + { + content: "wait web client", + trigger: ".o_base_settings", + run: function() {} + }, + { + content: "active 'Multi-Step Routes'", + trigger: '.o_field_boolean[name="group_stock_adv_location"]', + run: function() { + if (!this.$anchor.find('input').prop('checked')) { + this.$anchor.find('label').click(); + $('.o_statusbar_buttons button[name="execute"]').click(); + } + } + }, + { + content: "list of product variants", + trigger: '.o_sub_menu .oe_secondary_submenu [data-menu-xmlid="stock.menu_product_variant_config_stock"]', + extra_trigger: '.o_sub_menu .oe_secondary_submenu:has(a[data-menu-xmlid="stock.menu_routes_config"])', + timeout: 5000, + }, + { + content: "select a product variant", + trigger: '.oe_kanban_global_click:first', + }, + { + content: "click on routes", + trigger: 'button.oe_stat_button i.fa-cogs', + }, + { + content: "print the report", + trigger: 'button[name="print_report"]', + }, + { + content: "print inside the report and check the breadcrum", + trigger: '.o_content iframe .o_report_stock_rule_rule_name', + extra_trigger: 'ol.breadcrumb li:eq(2).active', + }, + { + content: "print the report", + trigger: 'ol.breadcrumb li:eq(3).active', + }, + ] +); + +}); diff --git a/addons/stock/tests/__init__.py b/addons/stock/tests/__init__.py index 25ae6888c7c..50780301d3d 100644 --- a/addons/stock/tests/__init__.py +++ b/addons/stock/tests/__init__.py @@ -14,3 +14,6 @@ from . import test_packing from . import test_packing_neg from . import test_proc_rule from . import test_wise_operator + +# TODO enable this test: error on runbot to create asset and open the iframe +# from . import test_ui diff --git a/addons/stock/tests/test_ui.py b/addons/stock/tests/test_ui.py new file mode 100644 index 00000000000..ef434ea678a --- /dev/null +++ b/addons/stock/tests/test_ui.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +import odoo.tests + +@odoo.tests.tagged('post_install', '-at_install') +class TestUi(odoo.tests.HttpCase): + + def test_01_admin_stock_route(self): + self.phantom_js("/web", "odoo.__DEBUG__.services['web_tour.tour'].run('stock')", "odoo.__DEBUG__.services['web_tour.tour'].tours.stock.ready", login='admin') diff --git a/addons/stock/views/stock_template.xml b/addons/stock/views/stock_template.xml index fa3ae244ee2..3ca9f6783b2 100644 --- a/addons/stock/views/stock_template.xml +++ b/addons/stock/views/stock_template.xml @@ -3,6 +3,7 @@