File: chatbot_script_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (80 lines) | stat: -rw-r--r-- 3,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8" ?>
<odoo><data>

    <record id="chatbot_script_view_form" model="ir.ui.view">
        <field name="name">chatbot.script.view.form</field>
        <field name="model">chatbot.script</field>
        <field name="arch" type="xml">
            <form>
                <header>
                </header>
                <field name="first_step_warning" invisible="1"/>
                <div class="alert alert-info text-center" role="alert"
                    invisible="first_step_warning != 'first_step_operator'">
                    <span>Tip: At least one interaction (Question, Email, ...) is needed before the Bot can perform more complex actions (Forward to an Operator, ...). </span>
                    <span>Use Channel Rules if you want the Bot to interact with visitors only when no operator is available.</span>
                </div>
                <div class="alert alert-info text-center" role="alert"
                    invisible="first_step_warning != 'first_step_invalid'">
                    <span>Tip: At least one interaction (Question, Email, ...) is needed before the Bot can perform more complex actions (Forward to an Operator, ...).</span>
                </div>
                <sheet>
                    <div class="oe_button_box" name="button_box">
                        <button name="action_view_livechat_channels" type="object" class="oe_stat_button"
                                icon="fa-comments" invisible="livechat_channel_count == 0">
                            <field name="livechat_channel_count" string="Channels" widget="statinfo"/>
                        </button>
                    </div>
                    <field name="active" invisible="1"/>
                    <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
                    <field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
                    <div class="oe_title">
                        <label for="title" string="Chatbot Name"/>
                        <h1><field name="title" default_focus="1" placeholder='e.g. "Meeting Scheduler Bot"'/></h1>
                    </div>
                    <notebook>
                        <page string="Script" name="page_script">
                            <field name="script_step_ids" widget="chatbot_steps_one2many" nolabel="1"
                                context="{'chatbot_script_answer_display_short_name': 1}"/>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <record id="chatbot_script_view_tree" model="ir.ui.view">
        <field name="name">chatbot.script.view.list</field>
        <field name="model">chatbot.script</field>
        <field name="arch" type="xml">
            <list sample="1">
                <field name="title"/>
            </list>
        </field>
    </record>

    <record id="chatbot_script_view_search" model="ir.ui.view">
        <field name="name">chatbot.script.view.search</field>
        <field name="model">chatbot.script</field>
        <field name="arch" type="xml">
            <search>
                <field name="title" string="Name" filter_domain="[('title', 'ilike', self)]"/>
                <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
            </search>
        </field>
    </record>

    <record id="chatbot_script_action" model="ir.actions.act_window">
        <field name="name">Chatbot</field>
        <field name="res_model">chatbot.script</field>
        <field name="view_mode">list,form</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Create a Chatbot
            </p><p>
                You can create a new Chatbot with a defined script to speak to your website visitors.
            </p>
        </field>
    </record>

</data></odoo>