Skip to content

Commit 8e4c927

Browse files
dhrs-odoojaeschwa
authored andcommitted
[ADD] agriculture_shop: purchase flow tour
1 parent 3e237bb commit 8e4c927

File tree

5 files changed

+162
-1
lines changed

5 files changed

+162
-1
lines changed

agriculture_shop/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'data/website_view.xml',
3838
'data/website_theme_apply.xml',
3939
'data/knowledge_tour.xml',
40+
'data/purchase_tour.xml',
4041
],
4142
'demo': [
4243
'demo/res_partner.xml',
@@ -69,6 +70,7 @@
6970
'assets': {
7071
'web.assets_backend': [
7172
'agriculture_shop/static/src/js/my_tour.js',
73+
'agriculture_shop/static/src/js/tours/*',
7274
]
7375
},
7476
'author': 'Odoo S.A.',
@@ -77,6 +79,7 @@
7779
"static/src/js/my_tour.js",
7880
"data/website_view.xml",
7981
"demo/website_view.xml",
82+
"static/src/js/tours/purchase_flow.js",
8083
],
8184
'images': ['images/main.png'],
8285
}

agriculture_shop/data/knowledge_article.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<li>Confirm RFQ based on best price</li>
4242
<li><font style="color: var(--color) !important;">Validate the reception for all quantities at once. </font></li>
4343
</ul>
44+
<a class="btn btn-primary mb-2" href="/odoo?tour=custom_tour_purchase" data-bs-original-title="" title="">Purchase Flow Tutorial</a>
4445
<h2 style="margin-bottom: 0px;">
4546
<font class="text-black"><strong>Flow 2: Sales from Website (B2B / B2C) </strong></font>
4647
</h2>
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_tour" model="web_tour.tour">
4+
<field name="name">purchase_custom_tour</field>
5+
<field name="sequence">1000</field>
6+
<field name="rainbow_man_message">Welcome! Happy exploring.</field>
7+
</record>
8+
</odoo>

agriculture_shop/data/res_config_settings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
<record id="res_config_account_setting_agriculture" model="res.config.settings">
44
<field name="group_analytic_accounting" eval="1"/>
55
<field name="group_product_pricelist" eval="True"/>
6+
<field name="module_purchase_requisition" eval="1"/>
7+
<field name="group_purchase_alternatives" eval="1"/>
68
</record>
7-
<function name="execute" model="res.config.settings">
9+
<function model="res.config.settings" name="execute">
810
<value eval="[ref('res_config_account_setting_agriculture')]"/>
911
</function>
1012
</odoo>
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
import { registry } from '@web/core/registry';
2+
3+
registry.category("web_tour.tours").add("purchase_custom_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 gloster"
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 on"
29+
},
30+
{
31+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
32+
"run": "click"
33+
},
34+
{
35+
"trigger": ".o_form_button_save",
36+
"run": "click"
37+
},
38+
{
39+
"trigger": ".o_notebook_headers a[name='alternative_pos']",
40+
"run": "click"
41+
},
42+
{
43+
"trigger": ".o_field_x2many_list_row_add > a",
44+
"run": "click"
45+
},
46+
{
47+
"trigger": ".o_create_button",
48+
"run": "click"
49+
},
50+
{
51+
"trigger": "main .o_field_widget[name='partner_id'] .o-autocomplete--input",
52+
"run": "edit ast"
53+
},
54+
{
55+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
56+
"run": "click"
57+
},
58+
{
59+
"trigger": ".o_section_and_note_list_view a:nth-child(1)",
60+
"run": "click"
61+
},
62+
{
63+
"trigger": ".o_field_product_label_section_and_note_cell .o-autocomplete--input",
64+
"run": "edit on"
65+
},
66+
{
67+
"trigger": ".o-autocomplete--dropdown-item:nth-child(1) > a",
68+
"run": "click"
69+
},
70+
{
71+
"trigger": ".o_field_widget[name='product_qty'] > .o_input",
72+
"run": "edit 100"
73+
},
74+
{
75+
"trigger": ".o-wysiwyg div[contenteditable='true']",
76+
"run": "click"
77+
},
78+
{
79+
"trigger": ".o_data_cell[name='price_unit']",
80+
"run": "click"
81+
},
82+
{
83+
"trigger": ".o_field_widget[name='price_unit'] > .o_input",
84+
"run": "edit 110"
85+
},
86+
{
87+
"trigger": ".o-wysiwyg div[contenteditable='true']",
88+
"run": "click"
89+
},
90+
{
91+
"trigger": "footer > .o_form_button_save",
92+
"run": "click"
93+
},
94+
{
95+
"trigger": ".o_cell button[name='action_compare_alternative_lines']",
96+
"run": "click"
97+
},
98+
{
99+
"trigger": ".o_data_row:nth-child(3) .o_clear_qty_buttons[name='action_choose']",
100+
"run": "click"
101+
},
102+
{
103+
"trigger": ".o_back_button > a",
104+
"run": "click"
105+
},
106+
{
107+
"trigger": ".o_statusbar_buttons > button[name='button_confirm']",
108+
"run": "click"
109+
},
110+
{
111+
"trigger": ".o_technical_modal button[name='action_cancel_alternatives']",
112+
"run": "click"
113+
},
114+
{
115+
"trigger": ".o_statusbar_buttons > button[name='action_view_picking']",
116+
"run": "click"
117+
},
118+
{
119+
"trigger": ".o_data_cell:nth-child(5) > button[name='Open\\ Move']",
120+
"run": "click"
121+
},
122+
{
123+
"trigger": ".o_data_cell[name='lot_name']",
124+
"run": "click"
125+
},
126+
{
127+
"trigger": ".o_field_widget[name='lot_name'] > .o_input",
128+
"run": "edit lot001"
129+
},
130+
{
131+
"trigger": "footer > .o_form_button_save",
132+
"run": "click"
133+
},
134+
{
135+
"trigger": ".o_statusbar_buttons > button[name='button_validate']",
136+
"run": "click"
137+
},
138+
{
139+
"trigger": ".o_breadcrumb li:nth-child(1) > a",
140+
"run": "click"
141+
},
142+
{
143+
"trigger": ".o_menu_brand",
144+
"run": "click"
145+
}
146+
]
147+
})

0 commit comments

Comments
 (0)