~openobject-training/+junk/openobject-addons-training-thamini-core_config

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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="view_ir_config_tree">
            <field name="name">ir.config.tree</field>
            <field name="model">ir.config</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Database config option" editable="1">
                    <field name="name"/>
                    <field name="type"/>
                    <field name="value"/>
                    <field name="default_value"/>
                </tree>
            </field>
        </record>

        <record model="ir.ui.view" id="view_ir_config_form">
            <field name="name">ir.config.form</field>
            <field name="model">ir.config</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Database config option">
                    <group colspan="4">
                        <field name="name" colspan="4"/>
                        <field name="type"/>
                    </group>
                    <group colspan="4" col="6">
                        <field name="value"/>
                        <field name="default_value"/>
                        <button icon="gtk-ok" name="reset_default_values" string="Reset default values" type="object" confirm="Are you sure you want to reset to default value?"/>
                    </group>
                    <separator string="Description" colspan="4"/>
		            <field name="description" nolabel="1"/>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_ir_config">
            <field name="name">Configuration option</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">ir.config</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="view_ir_config_form"/>
        </record>
        <record model="ir.actions.act_window.view" id="action_ir_config_tree">
            <field name="sequence" eval="10"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_ir_config_tree"/>
            <field name="act_window_id" ref="action_ir_config"/>
        </record>
        <record model="ir.actions.act_window.view" id="action_ir_config_form">
            <field name="sequence" eval="20"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_ir_config_form"/>
            <field name="act_window_id" ref="action_ir_config"/>
        </record>

        <menuitem action="action_ir_config" id="menu_ir_config" parent="base.menu_config" sequence="50" string="Configuration option"/>

    </data>
</openerp>