<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <record model="ir.ui.view" id="document_incoming_view_form">
            <field name="model">document.incoming</field>
            <field name="inherit" ref="document_incoming.document_incoming_view_form"/>
            <field name="name">document_incoming_form</field>
        </record>

        <record model="ir.model.button" id="document_incoming_proceed_button">
            <field name="model">document.incoming</field>
            <field name="name">ocr_send_feedback</field>
            <field name="string">Send Feedback</field>
        </record>

        <record model="ir.ui.view" id="document_incoming_ocr_service_view_form">
            <field name="model">document.incoming.ocr.service</field>
            <field name="type">form</field>
            <field name="name">document_incoming_ocr_service_form</field>
        </record>

        <record model="ir.ui.view" id="document_incoming_ocr_service_view_list">
            <field name="model">document.incoming.ocr.service</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="name">document_incoming_ocr_service_list</field>
        </record>

        <record model="ir.ui.view" id="document_incoming_ocr_service_view_list_sequence">
            <field name="model">document.incoming.ocr.service</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="name">document_incoming_ocr_service_list_sequence</field>
        </record>

        <record model="ir.action.act_window" id="act_document_incoming_ocr_service_form">
            <field name="name">OCR Services</field>
            <field name="res_model">document.incoming.ocr.service</field>
        </record>
        <record model="ir.action.act_window.view" id="act_document_incoming_ocr_service_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="document_incoming_ocr_service_view_list_sequence"/>
            <field name="act_window" ref="act_document_incoming_ocr_service_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_document_incoming_ocr_service_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="document_incoming_ocr_service_view_form"/>
            <field name="act_window" ref="act_document_incoming_ocr_service_form"/>
        </record>

        <menuitem
            parent="document_incoming.menu_configuration"
            action="act_document_incoming_ocr_service_form"
            sequence="20"
            id="menu_document_incoming_ocr_service_form"/>

        <record model="ir.model.access" id="access_document_incoming_ocr_service">
            <field name="model">document.incoming.ocr.service</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_document_incoming_ocr_service_group_document_incoming_admin">
            <field name="model">document.incoming.ocr.service</field>
            <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.rule.group" id="rule_group_document_incoming_ocr_service_companies">
            <field name="name">User in companies</field>
            <field name="model">document.incoming.ocr.service</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_document_incoming_ocr_service_companies1">
            <field name="domain" eval="[('company', 'in', Eval('companies', []))]" pyson="1"/>
            <field name="rule_group" ref="rule_group_document_incoming_ocr_service_companies"/>
        </record>
        <record model="ir.rule" id="rule_document_incoming_ocr_service_companies2">
            <field name="domain" eval="[('company', '=', None)]" pyson="1"/>
            <field name="rule_group" ref="rule_group_document_incoming_ocr_service_companies"/>
        </record>

    </data>
</tryton>
