Skip to content

Commit 95b116a

Browse files
committed
[ADD] micro_brewery: added tour
1 parent 04ef344 commit 95b116a

File tree

4 files changed

+147
-0
lines changed

4 files changed

+147
-0
lines changed

micro_brewery/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
'data/website_view.xml',
5454
'data/ir_model_data.xml',
5555
'data/knowledge_tour.xml',
56+
'data/manufacturing_tour.xml',
5657
],
5758
'demo': [
5859
'demo/website.xml',
@@ -84,12 +85,14 @@
8485
'assets': {
8586
'web.assets_backend': [
8687
'micro_brewery/static/src/js/my_tour.js',
88+
'micro_brewery/static/src/js/tours/manufacturing_tour.js',
8789
]
8890
},
8991
'author': 'Odoo S.A.',
9092
"cloc_exclude": [
9193
"data/knowledge_article.xml",
9294
"static/src/js/my_tour.js",
95+
"static/src/js/tours/manufacturing_tour.js",
9396
],
9497
'images': ['images/main.png'],
9598
}

micro_brewery/data/knowledge_article.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
<p>It is interesting to mention that a lot of microbreweries do not have the machines for the kegging but it is possible to create a separate bill of Materials with the type subcontracting, if the bottling is made externally.</p>
100100
</div>
101101
</div>
102+
<a class="btn btn-primary mb-2" href="/odoo?tour=manufacturing_tour" data-bs-original-title="" title="">Crafting a beer Tutorial</a>
102103
<p> <br/></p>
103104
<p><span class="h3-fs"><strong>Purchase and receive components</strong></span></p>
104105
<p>Go into the purchase application and create a new purchase order with all the components you need to execute your recipe. Make sure you buy enough quantity of each components and validate the order.</p>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<record id="manufacturing_tour" model="web_tour.tour">
4+
<field name="name">manufacturing_tour</field>
5+
<field name="sequence">1000</field>
6+
<field name="rainbow_man_message">Good job! You went through all steps of this tour.</field>
7+
</record>
8+
</odoo>
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
import { registry } from '@web/core/registry';
2+
3+
registry.category("web_tour.tours").add("manufacturing_tour", {
4+
url: "/odoo",
5+
steps: () => [
6+
{
7+
"trigger": ".o_app[data-menu-xmlid='mrp\\.menu_mrp_root']",
8+
"run": "click"
9+
},
10+
{
11+
"trigger": ".o_main_navbar",
12+
"run": "click"
13+
},
14+
{
15+
"trigger": ".o-dropdown[data-menu-xmlid='mrp\\.menu_mrp_manufacturing']",
16+
"run": "click"
17+
},
18+
{
19+
"trigger": ".o-dropdown-item[data-menu-xmlid='mrp\\.menu_mrp_production_action']",
20+
"run": "click"
21+
},
22+
{
23+
"trigger": ".o_list_button_add",
24+
"run": "drag_and_drop .o_control_panel"
25+
},
26+
{
27+
"trigger": ".o_list_button_add",
28+
"run": "click"
29+
},
30+
{
31+
"trigger": ".oe_title > h1",
32+
"run": "click"
33+
},
34+
{
35+
"trigger": ".o_field_widget[name='product_id'] .o-autocomplete--input",
36+
"run": "edit blon"
37+
},
38+
{
39+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
40+
"run": "click"
41+
},
42+
{
43+
"trigger": ".o_statusbar_buttons > button[name='action_confirm']",
44+
"run": "click"
45+
},
46+
{
47+
"trigger": ".o_menu_brand",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": ".o_app[data-menu-xmlid='mrp_workorder\\.menu_mrp_workorder_root']",
52+
"run": "click"
53+
},
54+
{
55+
"trigger": ".o_control_panel_actions div:nth-child(1) > button:nth-child(1)",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".o_mrp_display_record button:nth-child(1)",
60+
"run": "click"
61+
},
62+
{
63+
"trigger": ".o_control_panel_actions button:nth-child(2)",
64+
"run": "click"
65+
},
66+
{
67+
"trigger": ".o_mrp_display_record button:nth-child(1)",
68+
"run": "click"
69+
},
70+
{
71+
"trigger": ".o_control_panel_actions button:nth-child(3)",
72+
"run": "click"
73+
},
74+
{
75+
"trigger": ".o_mrp_display_record button:nth-child(1)",
76+
"run": "click"
77+
},
78+
{
79+
"trigger": ".o_control_panel_actions button:nth-child(4)",
80+
"run": "click"
81+
},
82+
{
83+
"trigger": ".o_mrp_display_record button:nth-child(1)",
84+
"run": "click"
85+
},
86+
{
87+
"trigger": ".o_mrp_display_record button:nth-child(1)",
88+
"run": "click"
89+
},
90+
{
91+
"trigger": ".o_home_menu",
92+
"run": "click"
93+
},
94+
{
95+
"trigger": ".o_app[data-menu-xmlid='mrp\\.menu_mrp_root']",
96+
"run": "click"
97+
},
98+
{
99+
"trigger": ".o-dropdown[data-menu-xmlid='mrp\\.menu_mrp_manufacturing']",
100+
"run": "click"
101+
},
102+
{
103+
"trigger": ".o-dropdown-item[data-menu-xmlid='mrp\\.menu_mrp_production_action']",
104+
"run": "click"
105+
},
106+
{
107+
"trigger": ".o_data_row:nth-child(4) > .o_data_cell[name='name']",
108+
"run": "click"
109+
},
110+
{
111+
"trigger": ".o_statusbar_buttons > button[name='button_mark_done']",
112+
"run": "click"
113+
},
114+
{
115+
"trigger": ".o-default-button",
116+
"run": "click"
117+
},
118+
{
119+
"trigger": ".o_field_widget[name='lot_producing_id'] .o-autocomplete--input",
120+
"run": "edit 001"
121+
},
122+
{
123+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
124+
"run": "click"
125+
},
126+
{
127+
"trigger": ".o_statusbar_buttons > button[name='button_mark_done']",
128+
"run": "click"
129+
},
130+
{
131+
"trigger": ".o_menu_brand",
132+
"run": "click"
133+
}
134+
]
135+
})

0 commit comments

Comments
 (0)