Skip to content

Commit 5de06a7

Browse files
committed
[ADD] furniture_store: added tour for the custom flows and also
added button for redirection from knowledge article to tour
1 parent 0862041 commit 5de06a7

File tree

6 files changed

+106
-2
lines changed

6 files changed

+106
-2
lines changed

furniture_store/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'data/knowledge_article_favorite.xml',
4040
'data/mail_message.xml',
4141
'data/knowledge_tour.xml',
42+
'data/order_custom_product_tour.xml',
4243
],
4344
'demo': [
4445
'demo/res_partner.xml',
@@ -65,12 +66,14 @@
6566
'assets': {
6667
'web.assets_backend': [
6768
'furniture_store/static/src/js/my_tour.js',
69+
'furniture_store/static/src/js/tours/order_custom_product_tour.js',
6870
]
6971
},
7072
'author': 'Odoo S.A.',
7173
"cloc_exclude": [
7274
"data/knowledge_article.xml",
7375
"static/src/js/my_tour.js",
76+
"static/src/js/tours/order_custom_product_tour.js",
7477
],
7578
'images': ['images/main.png'],
7679
}

furniture_store/data/knowledge_article.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@
155155
</ul>
156156
<blockquote data-o-mail-quote-node="1" data-o-mail-quote="1">
157157
<strong>
158-
<font class="text-o-color-5"><span style="font-weight: normal;">You can use this flow for a product "Bed" &amp; as configuration is already setup. &amp; &amp; &amp; &amp; &amp; &amp; &amp; </span></font>
158+
<font class="text-o-color-5"><span style="font-weight: normal;">You can use this flow for a product "Bed" &amp; as configuration is already setup.</span></font>
159159
</strong>
160160
</blockquote>
161+
<a class="btn btn-primary mb-2" href="/odoo?tour=order_custom_product_tour" data-bs-original-title="" title="">Customized product Tutorial</a>
161162
<p data-o-mail-quote-node="1" data-o-mail-quote="1"><br /></p>
162163
<h2 data-o-mail-quote-node="1" data-o-mail-quote="1">
163164
<span style="font-weight: bolder;"><font class="text-o-color-5">Flow 4 : Sell Product in KIT</font></span>
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="order_custom_product_tour" model="web_tour.tour">
4+
<field name="name">order_custom_product_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>

furniture_store/data/product_template.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<field name="image_1920" type="base64" file="furniture_store/static/src/binary/product_template/10-image_1920" />
1313
<field name="list_price">699.0</field>
1414
<field name="website_ribbon_id" ref="website_sale.new_ribbon" />
15-
<field name="route_ids" eval="[(6, 0, [ref('purchase_stock.route_warehouse0_buy'), ref('stock.route_warehouse0_mto')])]"/>
15+
<field name="route_ids" eval="[(6, 0, [ref('purchase_stock.route_warehouse0_buy'), ref('stock.route_warehouse0_mto'), ref('stock_dropshipping.route_drop_shipping')])]"/>
1616
</record>
1717
<record id="product_template_12" model="product.template" context="{'create_product_product': False}">
1818
<field name="name">Sofa (Single seat)</field>

furniture_store/data/res_config_settings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<field name="group_stock_multi_locations" eval="1"/>
88
<field name="group_stock_adv_location" eval="1"/>
99
<field name="group_mrp_wo_shop_floor" eval="0"/>
10+
<field name="module_stock_dropshipping" eval="1"/>
1011
</record>
1112
<function model="res.config.settings" name="execute">
1213
<value eval="[ref('res_config_settings_enable')]"/>
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("order_custom_product_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_list_button_add",
12+
"run": "click"
13+
},
14+
{
15+
"trigger": ".o_field_widget[name='partner_id'] .o-autocomplete--input",
16+
"run": "edit excellent furnit"
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 > a:nth-child(1)",
24+
"run": "click"
25+
},
26+
{
27+
"trigger": ".o_field_product_label_section_and_note_cell .o-autocomplete--input",
28+
"run": "edit bed"
29+
},
30+
{
31+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
32+
"run": "click"
33+
},
34+
{
35+
"trigger": ".o_sale_product_configurator_table li:nth-child(2) > div",
36+
"run": "click"
37+
},
38+
{
39+
"trigger": ".o_sale_product_configurator_table li:nth-child(2) input[name='ptal-1']",
40+
"run": "click"
41+
},
42+
{
43+
"trigger": ".o_sale_product_configurator_qty input[name='sale_quantity']",
44+
"run": "edit 16"
45+
},
46+
{
47+
"trigger": ".o_sale_product_configurator_table td:nth-child(2)",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": ".o_sale_product_configurator_dialog button[name='sale_product_configurator_confirm_button']",
52+
"run": "click"
53+
},
54+
{
55+
"trigger": ".o_statusbar_buttons > button[name='action_confirm']",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".oe_stat_button[name='action_view_purchase_orders']",
60+
"run": "click"
61+
},
62+
{
63+
"trigger": ".o_statusbar_buttons > button[name='button_confirm']",
64+
"run": "click"
65+
},
66+
{
67+
"trigger": ".o_statusbar_buttons > button[name='action_view_picking']",
68+
"run": "click"
69+
},
70+
{
71+
"trigger": ".o_statusbar_buttons > button[name='button_validate']",
72+
"run": "click"
73+
},
74+
{
75+
"trigger": ".o_breadcrumb li:nth-child(2) > a",
76+
"run": "click"
77+
},
78+
{
79+
"trigger": ".o_field_widget[name='delivery_count'] > .o_stat_text",
80+
"run": "click"
81+
},
82+
{
83+
"trigger": ".o_statusbar_buttons > button[name='button_validate']",
84+
"run": "click"
85+
},
86+
{
87+
"trigger": ".o_menu_brand",
88+
"run": "click"
89+
}
90+
]
91+
})

0 commit comments

Comments
 (0)