Skip to content

Commit 6be3649

Browse files
committed
[ADD] coal_petroleum: added the tours as well the buttons to redirect to tours in knowledge articles
1 parent 869d46e commit 6be3649

File tree

6 files changed

+385
-0
lines changed

6 files changed

+385
-0
lines changed

coal_petroleum/__manifest__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
'data/quality_point.xml',
4848
'data/ir_model_data.xml',
4949
'data/knowledge_tour.xml',
50+
'data/purchase_flow_tour.xml',
51+
'data/sale_flow_tour.xml',
5052
],
5153
'demo': [
5254
'demo/res_partner.xml',
@@ -63,12 +65,16 @@
6365
'assets': {
6466
'web.assets_backend': [
6567
'coal_petroleum/static/src/js/my_tour.js',
68+
'coal_petroleum/static/src/js/tours/purchase_flow_tour.js',
69+
'coal_petroleum/static/src/js/tours/sale_flow_tour.js',
6670
]
6771
},
6872
'author': 'Odoo S.A.',
6973
"cloc_exclude": [
7074
"data/knowledge_article.xml",
7175
"static/src/js/my_tour.js",
76+
"static/src/js/tours/purchase_flow_tour.js",
77+
"static/src/js/tours/sale_flow_tour.js",
7278
],
7379
'images': ['images/main.png'],
7480
}

coal_petroleum/data/knowledge_article.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
<li>Set the destination location, and store the coal where you need it</li>
8181
</ul>
8282
<p>In addition, you can create a Landed Cost from the inventory Application.</p>
83+
<p><br /></p>
84+
<a class="btn btn-primary mb-2" href="/odoo?tour=purchase_flow_tour" data-bs-original-title="" title="">Purchase Flow Tutorial</a>
85+
<p><br /></p>
8386
<h2>Flow 2: Sales order &gt; Delivery &gt; Invoice</h2>
8487
<p>The company delivers the goods to the customer but before delivering it. They run a quality check to make sure everything is up to the mark. Create an Quotation, Confirm it. Run quality checks and deliver the product.</p>
8588
<p>To do that:</p>
@@ -97,6 +100,8 @@
97100
<li><font class="text-black">Create an</font><font style="color: rgb(255, 156, 0);"> Invoice from Sale Order </font><font class="text-black">based on the delivered quantities</font></li>
98101
</ol>
99102
<p><br /></p>
103+
<a class="btn btn-primary mb-2" href="/odoo?tour=sale_flow_tour" data-bs-original-title="" title="">Sales Flow Tutorial</a>
104+
<p><br /></p>
100105
</template>
101106

102107
<record id="welcome_article" model="knowledge.article">
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="purchase_flow_tour" model="web_tour.tour">
4+
<field name="name">purchase_flow_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: 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="sale_flow_tour" model="web_tour.tour">
4+
<field name="name">sale_flow_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: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
import { registry } from '@web/core/registry';
2+
3+
registry.category("web_tour.tours").add("purchase_flow_tour", {
4+
url: "/odoo",
5+
steps: () => [
6+
{
7+
"trigger": ".o_app[data-menu-xmlid='purchase\\.menu_purchase_root']",
8+
"run": "click"
9+
},
10+
{
11+
"trigger": ".o_list_button_add",
12+
"run": "click"
13+
},
14+
{
15+
"trigger": ".o_field_widget[name='partner_id'] .o-autocomplete--input",
16+
"run": "edit ark traders"
17+
},
18+
{
19+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
20+
"run": "click"
21+
},
22+
{
23+
"trigger": ".o_field_x2many_list_row_add",
24+
"run": "click"
25+
},
26+
{
27+
"trigger": ".o_field_x2many_list_row_add > a:nth-child(1)",
28+
"run": "click"
29+
},
30+
{
31+
"trigger": ".o_field_product_label_section_and_note_cell .o-autocomplete--input",
32+
"run": "edit anthra"
33+
},
34+
{
35+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
36+
"run": "click"
37+
},
38+
{
39+
"trigger": "tr:nth-child(1) > .o_matrix_input_td:nth-child(2) .o_input",
40+
"run": "edit 200"
41+
},
42+
{
43+
"trigger": ".o_technical_modal button:nth-child(1)",
44+
"run": "click"
45+
},
46+
{
47+
"trigger": ".o_statusbar_buttons > button[name='button_confirm']",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": ".o_menu_toggle",
52+
"run": "click"
53+
},
54+
{
55+
"trigger": ".o_app[data-menu-xmlid='stock\\.menu_stock_root']",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".o_kanban_record:nth-child(1) .oe_kanban_action[name='get_action_picking_tree_ready']",
60+
"run": "click"
61+
},
62+
{
63+
"trigger": ".o_data_row:nth-child(7) > .o_data_cell[name='location_id']",
64+
"run": "click"
65+
},
66+
{
67+
"trigger": ".o_data_cell:nth-child(9) > button[name='Open\\ Move']",
68+
"run": "click"
69+
},
70+
{
71+
"trigger": ".o_data_cell[name='lot_name']",
72+
"run": "click"
73+
},
74+
{
75+
"trigger": ".o_field_widget[name='lot_name'] > .o_input",
76+
"run": "edit lot 001"
77+
},
78+
{
79+
"trigger": "footer > .o_form_button_save",
80+
"run": "click"
81+
},
82+
{
83+
"trigger": ".o_wrap_field:nth-child(4) > .o_cell:nth-child(2)",
84+
"run": "click"
85+
},
86+
{
87+
"trigger": ".o_wrap_field:nth-child(4) > .o_cell:nth-child(2)",
88+
"run": "click"
89+
},
90+
{
91+
"trigger": ".o_field_widget[name='x_vehicle_no'] > .o_input",
92+
"run": "edit 1280aro"
93+
},
94+
{
95+
"trigger": ".o_statusbar_buttons > button[name='check_quality']",
96+
"run": "click"
97+
},
98+
{
99+
"trigger": ".o_field_widget[name='x_test_type_1'] > .o_input",
100+
"run": "click"
101+
},
102+
{
103+
"trigger": ".o_field_widget[name='x_test_type_1'] > .o_input",
104+
"run": "click"
105+
},
106+
{
107+
"trigger": ".o_field_widget[name='x_net_calorific_value'] > .o_input",
108+
"run": "edit 10"
109+
},
110+
{
111+
"trigger": ".o_field_widget[name='x_ash_content'] > .o_input",
112+
"run": "edit 20"
113+
},
114+
{
115+
"trigger": ".o_field_widget[name='x_moisture_content'] > .o_input",
116+
"run": "edit 20"
117+
},
118+
{
119+
"trigger": ".o_field_widget[name='x_test_type'] > .o_input",
120+
"run": "edit 20"
121+
},
122+
{
123+
"trigger": ".o_field_widget[name='x_total_sulphur'] > .o_input",
124+
"run": "edit 20"
125+
},
126+
{
127+
"trigger": ".o_field_widget[name='x_flying_substance'] > .o_input",
128+
"run": "edit 20"
129+
},
130+
{
131+
"trigger": ".o_field_widget[name='x_hardgrave_grindability_index'] > .o_input",
132+
"run": "edit 20"
133+
},
134+
{
135+
"trigger": "footer > .o_form_button_save",
136+
"run": "click"
137+
},
138+
{
139+
"trigger": ".o_statusbar_buttons > button[name='button_validate']",
140+
"run": "click"
141+
},
142+
{
143+
"trigger": ".o_menu_brand",
144+
"run": "click"
145+
},
146+
{
147+
"trigger": ".o_app[data-menu-xmlid='purchase\\.menu_purchase_root']",
148+
"run": "click"
149+
},
150+
{
151+
"trigger": ".o_data_row:nth-child(1) > .o_data_cell[name='partner_id']",
152+
"run": "click"
153+
},
154+
{
155+
"trigger": ".o_statusbar_buttons > button[name='action_create_invoice']",
156+
"run": "click"
157+
},
158+
{
159+
"trigger": ".o_field_widget[name='invoice_date'] .o_input",
160+
"run": "click"
161+
},
162+
{
163+
"trigger": ".o_date_item_cell:nth-child(31)",
164+
"run": "click"
165+
},
166+
{
167+
"trigger": ".o_statusbar_buttons > button[name='action_post']",
168+
"run": "click"
169+
},
170+
{
171+
"trigger": ".o_menu_brand",
172+
"run": "click"
173+
},
174+
{
175+
"trigger": ".o_home_menu",
176+
"run": "click"
177+
}
178+
]
179+
})

0 commit comments

Comments
 (0)