summaryrefslogtreecommitdiff
path: root/addons/account/static/src/js/tours
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/account/static/src/js/tours
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account/static/src/js/tours')
-rw-r--r--addons/account/static/src/js/tours/account.js93
1 files changed, 93 insertions, 0 deletions
diff --git a/addons/account/static/src/js/tours/account.js b/addons/account/static/src/js/tours/account.js
new file mode 100644
index 00000000..e854f1c3
--- /dev/null
+++ b/addons/account/static/src/js/tours/account.js
@@ -0,0 +1,93 @@
+odoo.define('account.tour', function(require) {
+"use strict";
+
+var core = require('web.core');
+var tour = require('web_tour.tour');
+
+var _t = core._t;
+
+tour.register('account_tour', {
+ url: "/web",
+ sequence: 60,
+}, [
+ ...tour.stepUtils.goToAppSteps('account.menu_finance', _t('Send invoices to your customers in no time with the <b>Invoicing app</b>.')),
+ {
+ trigger: "a.o_onboarding_step_action[data-method=action_open_base_onboarding_company]",
+ content: _t("Start by checking your company's data."),
+ position: "bottom",
+ }, {
+ trigger: "button[name=action_save_onboarding_company_step]",
+ extra_trigger: "a.o_onboarding_step_action[data-method=action_open_base_onboarding_company]",
+ content: _t("Looks good. Let's continue."),
+ position: "left",
+ }, {
+ trigger: "a.o_onboarding_step_action[data-method=action_open_base_document_layout]",
+ content: _t("Customize your layout."),
+ position: "bottom",
+ }, {
+ trigger: "button[name=document_layout_save]",
+ extra_trigger: "a.o_onboarding_step_action[data-method=action_open_base_document_layout]",
+ content: _t("Once everything is as you want it, validate."),
+ position: "left",
+ }, {
+ trigger: "a.o_onboarding_step_action[data-method=action_open_account_onboarding_create_invoice]",
+ content: _t("Now, we'll create your first invoice."),
+ position: "bottom",
+ }, {
+ trigger: "div[name=partner_id] input",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Write a company name to <b>create one</b> or <b>see suggestions</b>."),
+ position: "bottom",
+ }, {
+ trigger: ".o_m2o_dropdown_option a:contains('Create')",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Select first partner"),
+ auto: true,
+ }, {
+ trigger: ".modal-content button.btn-primary",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Once everything is set, you are good to continue. You will be able to edit this later in the <b>Customers</b> menu."),
+ auto: true,
+ }, {
+ trigger: "div[name=invoice_line_ids] .o_field_x2many_list_row_add a:not([data-context])",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Add a line to your invoice"),
+ }, {
+ trigger: "div[name=invoice_line_ids] textarea[name=name]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Fill in the details of the line."),
+ position: "bottom",
+ }, {
+ trigger: "div[name=invoice_line_ids] input[name=price_unit]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Set a price"),
+ position: "bottom",
+ run: 'text 100',
+ }, {
+ trigger: "button[name=action_post]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Once your invoice is ready, press CONFIRM."),
+ }, {
+ trigger: "button[name=action_invoice_sent]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Send the invoice and check what the customer will receive."),
+ }, {
+ trigger: "input[name=email]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Write here <b>your own email address</b> to test the flow."),
+ run: 'text customer@example.com',
+ auto: true,
+ }, {
+ trigger: ".modal-content button.btn-primary",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Validate."),
+ auto: true,
+ }, {
+ trigger: "button[name=send_and_print_action]",
+ extra_trigger: "[name=move_type][raw-value=out_invoice]",
+ content: _t("Let's send the invoice."),
+ position: "left"
+ }
+]);
+
+});