Skip to content

Commit 5a79d4f

Browse files
committed
[ADD] bookstore: customer order flow
1 parent 26e35ed commit 5a79d4f

File tree

4 files changed

+105
-0
lines changed

4 files changed

+105
-0
lines changed

bookstore/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'data/knowledge_article_favorite.xml',
3939
'data/mail_message.xml',
4040
'data/knowledge_tour.xml',
41+
'data/customer_order_tour.xml',
4142
],
4243
'demo': [
4344
'demo/res_partner.xml',
@@ -57,11 +58,13 @@
5758
'assets': {
5859
'web.assets_backend': [
5960
'bookstore/static/src/js/my_tour.js',
61+
'bookstore/static/src/js/tours/customer_order_tour.js',
6062
]
6163
},
6264
"cloc_exclude": [
6365
"data/knowledge_article.xml",
6466
"static/src/js/my_tour.js",
67+
"static/src/js/tours/customer_order_tour.js",
6568
],
6669
'license': 'OPL-1',
6770
'author': 'Odoo S.A.',
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="customer_order_tour" model="web_tour.tour">
4+
<field name="name">customer_order_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>

bookstore/data/knowledge_article.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
</div>
126126
</div>
127127
<h3><br /></h3>
128+
<p><br /></p>
129+
<a class="btn btn-primary mb-2" href="/odoo?tour=customer_order_tour" data-bs-original-title="" title="">Custom Order Flow Tutorial</a>
130+
<p><br /></p>
128131
<h3>3. Institutional customers</h3>
129132
<hr />
130133
<p>Let's say you now need to create a quotation for "The Great Library" near your shop. </p>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import { registry } from '@web/core/registry';
2+
3+
registry.category("web_tour.tours").add("customer_order_tour", {
4+
url: "/odoo",
5+
steps: () => [
6+
{
7+
"trigger": ".o_app[data-menu-xmlid='sale\\.sale_menu_root']",
8+
"run": "click"
9+
},
10+
{
11+
"trigger": ".o-dropdown[data-menu-xmlid='sale\\.product_menu_catalog']",
12+
"run": "click"
13+
},
14+
{
15+
"trigger": ".o-dropdown-item[data-menu-xmlid='sale\\.menu_product_template_action']",
16+
"run": "click"
17+
},
18+
{
19+
"trigger": ".o-kanban-button-new",
20+
"run": "click"
21+
},
22+
{
23+
"trigger": ".o_field_widget[name='name'] .o_input",
24+
"run": "edit Media Burn: Ant Farm and making of image"
25+
},
26+
{
27+
"trigger": ".o_inner_group:nth-child(1) > .o_wrap_field:nth-child(1) > .o_cell:nth-child(1)",
28+
"run": "click"
29+
},
30+
{
31+
"trigger": ".o_field_widget[name='barcode'] > .o_input",
32+
"run": "edit 9781941753355"
33+
},
34+
{
35+
"trigger": ".o_notebook_headers a[name='purchase']",
36+
"run": "click"
37+
},
38+
{
39+
"trigger": ".o_field_x2many_list_row_add > a",
40+
"run": "click"
41+
},
42+
{
43+
"trigger": ".o-autocomplete--input",
44+
"run": "edit my book di"
45+
},
46+
{
47+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": ".o_form_button_save",
52+
"run": "click"
53+
},
54+
{
55+
"trigger": ".o-dropdown[data-menu-xmlid='sale\\.sale_order_menu']",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".o-dropdown-item[data-menu-xmlid='sale\\.menu_sale_quotations']",
60+
"run": "click"
61+
},
62+
{
63+
"trigger": ".o_list_button_add",
64+
"run": "click"
65+
},
66+
{
67+
"trigger": ".o_field_widget[name='partner_id'] .o-autocomplete--input",
68+
"run": "edit hanna"
69+
},
70+
{
71+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
72+
"run": "click"
73+
},
74+
{
75+
"trigger": ".o_field_x2many_list_row_add > a:nth-child(1)",
76+
"run": "click"
77+
},
78+
{
79+
"trigger": ".o_field_product_label_section_and_note_cell .o-autocomplete--input",
80+
"run": "edit media burn: ant"
81+
},
82+
{
83+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
84+
"run": "click"
85+
},
86+
{
87+
"trigger": ".o_statusbar_buttons > button[name='action_confirm']",
88+
"run": "click"
89+
}
90+
]
91+
})

0 commit comments

Comments
 (0)