summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/website_telegram.xml
blob: d8590fc08d2dd2a27aae28b49a42b4f47932c37a (plain)
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
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <data>
        <record id="website_telegram_action" model="ir.actions.act_window">
            <field name="name">Channel Telegram</field>
            <field name="res_model">website.telegram</field>
            <field name="view_mode">tree,form</field>
        </record>

        <record id="website_telegram_tree" model="ir.ui.view">
            <field name="name">website.telegram.tree</field>
            <field name="model">website.telegram</field>
            <field name="arch" type="xml">
                <tree string="Channel List">
                        <field name="tittle"/>
                        <field name="about"/>
                        <field name="user_id"/>
                    <button name="test_send" type="object" icon="fa-paper-plane" string="Send Test"/>
<!--                    <button name="create_channel" type="object" icon="fa-paper-plane" string="Create Channel"/>-->
<!--                    <button name="receive_messages" type="object" icon="fa-paper-plane" string="GET Test"/>-->
                </tree>
            </field>
        </record>

        <record id="website_telegram_form" model="ir.ui.view">
            <field name="name">website.telegram.form</field>
            <field name="model">website.telegram</field>
            <field name="arch" type="xml">
                <form create="0">
                    <sheet>
                        <group>
                            <group>
                                <field name="tittle"/>
                                <field name="about"/>
                                <field name="user_id" widget="many2many_tags"/>
                            </group>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="ir_actions_server_website_telegram_sync_to_solr" model="ir.actions.server">
            <field name="name">Sync to solr</field>
            <field name="model_id" ref="indoteknik_custom.model_website_telegram"/>
            <field name="binding_model_id" ref="indoteknik_custom.model_website_telegram"/>
            <field name="state">code</field>
            <field name="code">model.action_sync_to_solr()</field>
        </record>

        <menuitem
            id="website_telegram"
            name="Channel Telegram"
            parent="website_sale.menu_orders"
            sequence="1"
            action="website_telegram_action"
        />
    </data>
</odoo>