<?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="res.group" id="group_lc">
            <field name="name">LC</field>
        </record>
        <record model="res.group" id="group_lc_admin">
            <field name="name">LC Administration</field>
            <field name="parent" ref="group_lc"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_lc">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_lc"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_lc_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_lc_admin"/>
        </record>

        <record model="ir.ui.view" id="lc_view_list">
            <field name="model">lc.mt700</field>
            <field name="type">tree</field>
            <field name="name">lc_list</field>
        </record>
        <record model="ir.ui.view" id="lc_view_form">
            <field name="model">lc.mt700</field>
            <field name="type">form</field>
            <field name="name">lc_form</field>
        </record>
        <record model="ir.action.act_window" id="act_lc_form">
            <field name="name">LC</field>
            <field name="res_model">lc.mt700</field>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_form_view">
            <field name="sequence" eval="70"/>
            <field name="view" ref="lc_view_list"/>
            <field name="act_window" ref="act_lc_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_form_view2">
            <field name="sequence" eval="80"/>
            <field name="view" ref="lc_view_form"/>
            <field name="act_window" ref="act_lc_form"/>
        </record>

        <record model="ir.ui.view" id="lc_out_view_list">
            <field name="model">lc.letter.outgoing</field>
            <field name="type">tree</field>
            <field name="name">lc_letter_outgoing_tree</field>
        </record>
        <record model="ir.ui.view" id="lc_out_view_form">
            <field name="model">lc.letter.outgoing</field>
            <field name="type">form</field>
            <field name="name">lc_letter_outgoing_form</field>
        </record>
        <record model="ir.action.act_window" id="act_lc_out_form">
            <field name="name">Outgoing LC</field>
            <field name="res_model">lc.letter.outgoing</field>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_out_form_view">
            <field name="sequence" eval="70"/>
            <field name="view" ref="lc_out_view_list"/>
            <field name="act_window" ref="act_lc_out_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_out_form_view2">
            <field name="sequence" eval="80"/>
            <field name="view" ref="lc_out_view_form"/>
            <field name="act_window" ref="act_lc_out_form"/>
        </record>

        <record model="ir.ui.view" id="lc_doc_prepa_view_list">
            <field name="model">lc.document.prepared</field>
            <field name="type">tree</field>
            <field name="name">document_prepared_tree</field>
        </record>
        <record model="ir.ui.view" id="lc_doc_prepa_view_form">
            <field name="model">lc.document.prepared</field>
            <field name="type">form</field>
            <field name="name">document_prepared_form</field>
        </record>

        <record model="ir.ui.view" id="lc_doc_track_view_list">
            <field name="model">lc.document.received</field>
            <field name="type">tree</field>
            <field name="name">document_tracking_tree</field>
        </record>
        <record model="ir.ui.view" id="lc_doc_track_view_form">
            <field name="model">lc.document.received</field>
            <field name="type">form</field>
            <field name="name">document_tracking_form</field>
        </record>

        <record model="ir.ui.view" id="lc_in_view_list">
            <field name="model">lc.letter.incoming</field>
            <field name="type">tree</field>
            <field name="name">lc_letter_incoming_tree</field>
        </record>
        <record model="ir.ui.view" id="lc_in_view_form">
            <field name="model">lc.letter.incoming</field>
            <field name="type">form</field>
            <field name="name">lc_letter_incoming_form</field>
        </record>
        <record model="ir.action.act_window" id="act_lc_in_form">
            <field name="name">Incoming LC</field>
            <field name="res_model">lc.letter.incoming</field>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_in_form_view">
            <field name="sequence" eval="70"/>
            <field name="view" ref="lc_in_view_list"/>
            <field name="act_window" ref="act_lc_in_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_lc_in_form_view2">
            <field name="sequence" eval="80"/>
            <field name="view" ref="lc_in_view_form"/>
            <field name="act_window" ref="act_lc_in_form"/>
        </record>

        <record model="ir.ui.view" id="lc_doc_view_list">
            <field name="model">lc.document.type</field>
            <field name="type">form</field>
            <field name="name">lc_document_type_form</field>
        </record>

        <record model="ir.ui.view" id="import_swift_start_view_form">
            <field name="model">lc.import_swift.start</field>
            <field name="type">form</field>
            <field name="name">import_swift_start_form</field>
        </record>

        <record model="ir.action.wizard" id="action_import_swift">
            <field name="name">Import SWIFT</field>
            <field name="wiz_name">lc.import_swift</field>
        </record>
        <record model="ir.action.keyword" id="swift_wizard_keyword">
            <field name="keyword">form_action</field>
            <field name="model">lc.letter.incoming,-1</field>
            <field name="action" ref="action_import_swift"/>
        </record>

        <record model="ir.action.wizard" id="action_analyze_conditions">
            <field name="name">Analyze conditions</field>
            <field name="wiz_name">lc.analyze.conditions</field>
        </record>
        <record model="ir.action.keyword" id="analyze_wizard_keyword">
            <field name="keyword">form_action</field>
            <field name="model">lc.letter.incoming,-1</field>
            <field name="action" ref="action_analyze_conditions"/>
        </record>

        <record model="ir.action.wizard" id="action_prepare_doc">
            <field name="name">Prepare documents</field>
            <field name="wiz_name">lc.prepare.doc</field>
        </record>
        <record model="ir.action.keyword" id="prepare_wizard_keyword">
            <field name="keyword">form_action</field>
            <field name="model">lc.letter.incoming,-1</field>
            <field name="action" ref="action_prepare_doc"/>
        </record>

        <record model="ir.model.access" id="access_lc">
            <field name="model">lc.letter.incoming</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.model.access" id="access_lc_lc">
            <field name="model">lc.letter.incoming</field>
            <field name="group" ref="group_lc_admin"/>
            <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.access" id="access_lc_out">
            <field name="model">lc.letter.outgoing</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.model.access" id="access_lc_lc_out">
            <field name="model">lc.letter.outgoing</field>
            <field name="group" ref="group_lc_admin"/>
            <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="lc_in_cancel_button">
            <field name="model">lc.letter.incoming</field>
            <field name="name">cancel</field>
            <field name="string">Cancel</field>
            <field name="confirm">Are you sure you want to cancel the LC?</field>
        </record>
        <record model="ir.model.button" id="lc_in_draft_button">
            <field name="model">lc.letter.incoming</field>
            <field name="name">draft</field>
            <field name="string">Reset to Draft</field>
        </record>
        <record model="ir.model.button" id="lc_in_submit_button">
            <field name="model">lc.letter.incoming</field>
            <field name="name">submit</field>
            <field name="string">Submit</field>
            <field name="confirm">Are you sure you want to submit the LC?</field>
        </record>
        <record model="ir.model.button" id="lc_in_approved_button">
            <field name="model">lc.letter.incoming</field>
            <field name="name">approve</field>
            <field name="string">Approve</field>
            <field name="confirm">Are you sure you want to approved the LC?</field>
        </record>

        <record model="ir.model.button" id="lc_out_cancel_button">
            <field name="model">lc.letter.outgoing</field>
            <field name="name">cancel</field>
            <field name="string">Cancel</field>
            <field name="confirm">Are you sure you want to cancel the LC?</field>
        </record>
        <record model="ir.model.button" id="lc_out_draft_button">
            <field name="model">lc.letter.outgoing</field>
            <field name="name">draft</field>
            <field name="string">Reset to Draft</field>
        </record>
        <record model="ir.model.button" id="lc_out_submit_button">
            <field name="model">lc.letter.outgoing</field>
            <field name="name">submit</field>
            <field name="string">Submit</field>
            <field name="confirm">Are you sure you want to submit the LC?</field>
        </record>
        <record model="ir.model.button" id="lc_out_approved_button">
            <field name="model">lc.letter.outgoing</field>
            <field name="name">approve</field>
            <field name="string">Approve</field>
            <field name="confirm">Are you sure you want to approved the LC?</field>
        </record>

        <record model="ir.action.wizard" id="act_create_lc">
            <field name="name">Create LC</field>
            <field name="wiz_name">create.lc</field>
        </record>

        <record model="ir.action.keyword" id="act_create_lc_keyword">
            <field name="keyword">form_action</field>
            <field name="model">sale.sale,-1</field>
            <field name="action" ref="act_create_lc"/>
        </record>

        <record model="ir.action.keyword" id="act_create_lc_keyword_purchase">
            <field name="keyword">form_action</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_create_lc"/>
        </record>

        <record model="ir.ui.view" id="create_lc_start_form">
            <field name="model">create.lc.start</field>
            <field name="type">form</field>
            <field name="name">create_lc_start_form</field>
        </record>
        <record model="ir.ui.view" id="create_lc_message_form">
            <field name="model">create.lc.message</field>
            <field name="type">form</field>
            <field name="name">create_lc_message_form</field>
        </record>
        <!-- <menuitem
            parent="bank.menu_banking"
            sequence="99"
            action="act_lc_form"
            id="menu_lc_form"/> -->
        <menuitem
            parent="bank.menu_banking"
            sequence="100"
            action="act_lc_in_form"
            id="menu_lc_in_form"/>
        <menuitem
            parent="bank.menu_banking"
            sequence="101"
            action="act_lc_out_form"
            id="menu_lc_out_form"/>

    </data>
</tryton>