Skip to content

Commit 192468e

Browse files
author
Lea Wolf
committed
[IMP] sale_order_archive: add tutorial tour
1 parent 0689cb3 commit 192468e

File tree

8 files changed

+119
-5
lines changed

8 files changed

+119
-5
lines changed

sale_order_archive/README.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ menus.
5353
Usage
5454
=====
5555

56+
To test the module you can follow these steps or you can do the
57+
sale_order_archive_tour
58+
5659
To archive sale orders, you need to:
5760

5861
1. Open the tree view of sale orders.
@@ -92,12 +95,12 @@ Authors
9295
Contributors
9396
------------
9497

95-
- Andrea Stirpe <[email protected]>
96-
- Kinner Vachhani
97-
- Ruchir Shukla <[email protected]>
98-
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
98+
- Andrea Stirpe <[email protected]>
99+
- Kinner Vachhani
100+
- Ruchir Shukla <[email protected]>
101+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
99102

100-
- Bhavesh Heliconia
103+
- Bhavesh Heliconia
101104

102105
Maintainers
103106
-----------

sale_order_archive/__manifest__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
"license": "AGPL-3",
1212
"depends": ["sale"],
1313
"data": ["views/sale_order.xml"],
14+
"demo": ["data/tours.xml"],
1415
"installable": True,
16+
"assets": {
17+
"web.assets_backend": [
18+
"sale_order_archive/static/src/js/tours/sale_order_archive_tour.esm.js",
19+
],
20+
},
1521
}

sale_order_archive/data/tours.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record id="sale_order_archive_tour" model="web_tour.tour">
4+
<field name="name">sale_order_archive_tour</field>
5+
<field name="sequence">20</field>
6+
<field
7+
name="rainbow_man_message"
8+
><![CDATA[
9+
<b>Congratulations</b>,the tour was successfully completed<br>
10+
]]></field>
11+
</record>
12+
</odoo>

sale_order_archive/readme/USAGE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
To test the module you can follow these steps or you can do the sale_order_archive_tour
2+
13
To archive sale orders, you need to:
24

35
1. Open the tree view of sale orders.

sale_order_archive/static/description/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
399399
</div>
400400
<div class="section" id="usage">
401401
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
402+
<p>To test the module you can follow these steps or you can do the
403+
sale_order_archive_tour</p>
402404
<p>To archive sale orders, you need to:</p>
403405
<ol class="arabic simple">
404406
<li>Open the tree view of sale orders.</li>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/** @odoo-module */
2+
import {registry} from "@web/core/registry";
3+
import {stepUtils} from "@web_tour/tour_service/tour_utils";
4+
5+
registry.category("web_tour.tours").add("sale_order_archive_tour", {
6+
url: "/odoo",
7+
8+
steps: () => [
9+
stepUtils.showAppsMenuItem(),
10+
{
11+
content: "Open the database",
12+
trigger: ".o_app[data-menu-xmlid='sale.sale_menu_root']",
13+
run: "click",
14+
},
15+
{
16+
content: "Remove all filters",
17+
trigger: ".o_facet_remove",
18+
run: "click",
19+
},
20+
{
21+
content: "Choose the row with 'Quotation'",
22+
trigger: ".o_data_row:has(td:contains('Quotation')) input",
23+
position: "right",
24+
run: "click",
25+
},
26+
{
27+
content: "Go to 'Action'",
28+
trigger: "div:nth-child(2) > .o-dropdown",
29+
position: "bottom",
30+
run: "click",
31+
},
32+
{
33+
content: "Choose 'Cancel'",
34+
trigger: ".o-dropdown-item:contains('Cancel')",
35+
position: "right",
36+
run: "click",
37+
},
38+
{
39+
content: "Confirm the cancellation",
40+
trigger: ".modal-footer .btn-primary",
41+
position: "right",
42+
run: "click",
43+
},
44+
{
45+
content: "Wait for the row to appear as 'Cancelled'",
46+
trigger: ".o_technical_modal button[name='action_mass_cancel']",
47+
48+
position: "right",
49+
},
50+
{
51+
content: "Choose the row with 'Cancelled'",
52+
trigger: ".o_data_row:has(td:contains('Cancelled')) input",
53+
position: "right",
54+
run: "click",
55+
},
56+
{
57+
content: "Go to 'Action",
58+
trigger: "div:nth-child(2) > .o-dropdown",
59+
position: "bottom",
60+
run: "click",
61+
},
62+
{
63+
content: "Choose 'Archive'",
64+
trigger: ".o-dropdown-item:contains('Archive')",
65+
position: "right",
66+
run: "click",
67+
},
68+
{
69+
content: "Confirm the archiving",
70+
trigger: ".modal-footer .btn-primary",
71+
position: "right",
72+
run: "click",
73+
},
74+
],
75+
});

sale_order_archive/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from . import test_sale_order_archive
2+
from . import test_ui
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+
from odoo.tests.common import HttpCase, tagged
4+
5+
from odoo.addons.base.tests.common import BaseCommon
6+
7+
8+
@tagged("post_install", "-at_install")
9+
class TestSaleOrderArchiveUi(BaseCommon, HttpCase):
10+
def test_01_sale_tour(self):
11+
self.start_tour(
12+
"/web", "sale_order_archive_tour", login="admin", step_delay=100
13+
)

0 commit comments

Comments
 (0)