<?xml version="1.0"?>
<tryton>
    <data>
        <record model="res.group" id="group_automation">
            <field name="name">Automation</field>
        </record>
        <record model="res.group" id="group_automation_admin">
            <field name="name">Automation Administration</field>
            <field name="parent" ref="group_automation"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_automation">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_automation"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_automation_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_automation_admin"/>
        </record>

        <record model="ir.ui.icon" id="automation_icon">
            <field name="name">tradon-automation</field>
            <field name="path">icons/tradon-automation.svg</field>
        </record>

        <record model="ir.ui.view" id="automation_document_form">
            <field name="model">automation.document</field>
            <field name="type">form</field>
            <field name="name">automation_document_form</field>
        </record>
        <record model="ir.ui.view" id="automation_document_list">
            <field name="model">automation.document</field>
            <field name="type">tree</field>
            <field name="name">automation_document_list</field>
        </record>
        <record model="ir.ui.view" id="automation_rule_set_form">
            <field name="model">automation.rule.set</field>
            <field name="type">form</field>
            <field name="name">automation_rule_set_form</field>
        </record>
        <record model="ir.ui.view" id="automation_rule_set_list">
            <field name="model">automation.rule.set</field>
            <field name="type">tree</field>
            <field name="name">automation_rule_set_list</field>
        </record>
        <record model="ir.action.act_window" id="act_automation_form">
            <field name="name">Automation</field>
            <field name="res_model">automation.document</field>
        </record>
        <record model="ir.action.act_window.view" id="act_automation_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="automation_document_list"/>
            <field name="act_window" ref="act_automation_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_automation_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="automation_document_form"/>
            <field name="act_window" ref="act_automation_form"/>
        </record>

        <record model="ir.model.access" id="access_automation">
            <field name="model">automation.document</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_automation_automation">
            <field name="model">automation.document</field>
            <field name="group" ref="group_automation"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>
        <record model="ir.model.button" id="auto_button1">
            <field name="model">automation.document</field>
            <field name="name">run_pipeline</field>
            <field name="string">Run Full Pipeline</field>
        </record>
        <record model="ir.model.button" id="auto_button2">
            <field name="model">automation.document</field>
            <field name="name">run_ocr</field>
            <field name="string">Run OCR</field>
        </record>
        <record model="ir.model.button" id="auto_button3">
            <field name="model">automation.document</field>
            <field name="name">run_structure</field>
            <field name="string">Run Structure</field>
        </record>
        <record model="ir.model.button" id="auto_button4">
            <field name="model">automation.document</field>
            <field name="name">run_tables</field>
            <field name="string">Run Tables</field>
        </record>
        <record model="ir.model.button" id="auto_button5">
            <field name="model">automation.document</field>
            <field name="name">run_metadata</field>
            <field name="string">Run Metadata</field>
        </record>

        <menuitem
            name="Automation"
            sequence="2"
            id="menu_automation"
            icon="tradon-automation" />
        <menuitem
            name="Documents"
            action="act_automation_form"
            parent="menu_automation"
            sequence="10"
            id="menu_documents" />
        <!-- <menuitem
            name="Rule Sets"
	        parent="menu_rule"
	        action="act_forex_bi"
	        sequence="20"
	        id="menu_forex_bi"/> -->
    </data>
</tryton>
