Skip to content

Commit 2795104

Browse files
committed
[IMP] last_ordered_products: web_tour added
- web_tour added to show flow of module
1 parent 7922c90 commit 2795104

File tree

4 files changed

+121
-4
lines changed

4 files changed

+121
-4
lines changed

last_ordered_products/__manifest__.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Show last ordered products for customers in sale order and for vendors in purchase order
99
""",
1010
'data': [
11+
'data/last_ordered_products_tour.xml',
1112
'views/account_move_form.xml',
1213
'views/sale_order_form.xml',
1314
'views/purchase_order_form.xml',
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="last_ordered_products_tour" model="web_tour.tour">
4+
<field name="name">last_ordered_products_tour</field>
5+
<field name="sequence">1</field>
6+
<field name="rainbow_man_message">Congrats, best of luck catching such big fish! :&#41;</field>
7+
</record>
8+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/** @odoo-module **/
2+
3+
import { _t } from "@web/core/l10n/translation";
4+
import { registry } from "@web/core/registry";
5+
import { stepUtils } from "@web_tour/tour_service/tour_utils";
6+
7+
registry.category("web_tour.tours").add('last_ordered_products_tour', {
8+
url: "/odoo",
9+
steps: () => [
10+
stepUtils.showAppsMenuItem(),
11+
{
12+
isActive: ["community"],
13+
trigger: ".o_app[data-menu-xmlid='sale.sale_menu_root']",
14+
content: _t("Lets create a beautiful quotation in a few clicks ."),
15+
tooltipPosition: "right",
16+
run: "click",
17+
},
18+
{
19+
isActive: ["enterprise"],
20+
trigger: ".o_app[data-menu-xmlid='sale.sale_menu_root']",
21+
content: _t("Let’s create a beautiful quotation in a few clicks ."),
22+
tooltipPosition: "bottom",
23+
run: "click",
24+
},
25+
{
26+
trigger: "button.o_list_button_add",
27+
content: _t("Build your first quotation right here!"),
28+
tooltipPosition: "bottom",
29+
run: "click",
30+
},
31+
{
32+
trigger: ".o_field_res_partner_many2one[name='partner_id'] input",
33+
content: _t("Search a customer name ('Azure Interior'"),
34+
tooltipPosition: "right",
35+
run: "edit Interior24",
36+
},
37+
{
38+
trigger: ".o-autocomplete--dropdown-item > a:contains('Azure')",
39+
content: "Select azure interior",
40+
run: "click",
41+
},
42+
{
43+
trigger: ".o_field_x2many_list_row_add",
44+
content: _t("Add a product"),
45+
tooltipPosition: "bottom",
46+
run: "click"
47+
},
48+
{
49+
trigger: ".o_field_widget[name='product_id'], .o_field_widget[name='product_template_id']",
50+
content: _t("Select a product"),
51+
tooltipPosition: "bottom",
52+
run: "click"
53+
},
54+
{
55+
trigger: ".o_field_sol_product_many2one[name='product_id'] input, .o_field_sol_product_many2one[name='product_id'] input",
56+
content: _t("Search a product (Large Cabinet)'"),
57+
tooltipPosition: "top",
58+
run: "edit E-COM07",
59+
},
60+
{
61+
trigger: ".o-autocomplete--dropdown-item > a:contains('Cabinet')",
62+
content: _t("Select Large Cabinet"),
63+
run: "click",
64+
},
65+
{
66+
trigger: ".o_form_button_save",
67+
content: _t("Save Manually"),
68+
run: "click",
69+
},
70+
{
71+
trigger: "button[name=action_confirm]",
72+
content: _t("Confirm Sale Order"),
73+
tooltipPosition: "bottom",
74+
run: "click"
75+
},
76+
{
77+
trigger: "#create_invoice_percentage",
78+
content: _t("Create Invoice"),
79+
tooltipPosition: "bottom",
80+
run: "click"
81+
},
82+
{
83+
trigger: ".o_form_button_create",
84+
content: _t("Create New Sale Order"),
85+
tooltipPosition: "bottom",
86+
run: "click"
87+
},
88+
{
89+
trigger: ".o_field_res_partner_many2one[name='partner_id'] input",
90+
content: _t("Search a customer name ('Azure Interior'"),
91+
tooltipPosition: "right",
92+
run: "edit Interior24",
93+
},
94+
{
95+
trigger: ".o-autocomplete--dropdown-item > a:contains('Azure')",
96+
content: "Select azure interior",
97+
run: "click",
98+
},
99+
{
100+
trigger: ".o_field_x2many_list_row_add",
101+
content: _t("Add a product"),
102+
tooltipPosition: "bottom",
103+
run: "click"
104+
},
105+
{
106+
trigger: ".o_field_widget[name='product_id'], .o_field_widget[name='product_template_id']",
107+
content: _t("You can see here Product Large Cabinet"),
108+
tooltipPosition: "bottom",
109+
run: "click"
110+
},
111+
]
112+
});

last_ordered_products/static/src/product_catalog/kanban_record.js

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import { ProductCatalogLastOrderOrderLine } from "./order_line/order_line";
33
import { patch } from "@web/core/utils/patch";
44

55
patch(ProductCatalogKanbanRecord.prototype, {
6-
setup() {
7-
super.setup();
8-
},
9-
106
get orderLineComponent() {
117
if (this.env.orderResModel === "sale.order") {
128
return ProductCatalogLastOrderOrderLine;

0 commit comments

Comments
 (0)