<?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.sequence.type" id="sequence_type_shipment_cost">
            <field name="name">Shipment Cost</field>
        </record>
        <record model="ir.sequence.type-res.group" id="sequence_type_shipment_cost_group_admin">
            <field name="sequence_type" ref="sequence_type_shipment_cost"/>
            <field name="group" ref="res.group_admin"/>
        </record>
        <record model="ir.sequence.type-res.group" id="sequence_type_shipment_cost_group_account_admin">
            <field name="sequence_type" ref="sequence_type_shipment_cost"/>
            <field name="group" ref="account.group_account_admin"/>
        </record>

        <record model="ir.sequence" id="sequence_shipment_cost">
            <field name="name">Shipment Cost</field>
            <field name="sequence_type" ref="sequence_type_shipment_cost"/>
        </record>

        <record model="ir.ui.view" id="configuration_view_form">
            <field name="model">account.configuration</field>
            <field name="inherit" ref="account.configuration_view_form"/>
            <field name="name">configuration_form</field>
        </record>

        <record model="ir.ui.view" id="shipment_cost_view_form">
            <field name="model">account.shipment_cost</field>
            <field name="type">form</field>
            <field name="name">shipment_cost_form</field>
        </record>

        <record model="ir.ui.view" id="shipment_cost_view_list">
            <field name="model">account.shipment_cost</field>
            <field name="type">tree</field>
            <field name="name">shipment_cost_list</field>
        </record>

        <record model="ir.action.act_window" id="act_shipment_cost_form">
            <field name="name">Shipment Costs</field>
            <field name="res_model">account.shipment_cost</field>
        </record>
        <record model="ir.action.act_window.view" id="act_shipment_cost_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="shipment_cost_view_list"/>
            <field name="act_window" ref="act_shipment_cost_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_shipment_cost_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="shipment_cost_view_form"/>
            <field name="act_window" ref="act_shipment_cost_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_shipment_cost_form_domain_draft">
            <field name="name">Draft</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_shipment_cost_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_shipment_cost_form_domain_posted">
            <field name="name">Posted</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'posted')]" pyson="1"/>
            <field name="act_window" ref="act_shipment_cost_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_shipment_cost_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"/>
            <field name="act_window" ref="act_shipment_cost_form"/>
        </record>

        <menuitem
            parent="account_invoice.menu_invoices"
            action="act_shipment_cost_form"
            sequence="30"
            id="menu_shipment_cost"/>

        <record model="ir.action.act_window" id="act_shipment_cost_form_shipment">
            <field name="name">Shipment Costs</field>
            <field name="res_model">account.shipment_cost</field>
            <field
                name="domain"
                eval="[If(Eval('active_ids', []) == [Eval('active_id')], (If(Eval('active_model') == 'stock.shipment.out.return', 'shipment_returns', 'shipments'), '=', Eval('active_id')), (If(Eval('active_model') == 'stock.shipment.out.return', 'shipment_returns', 'shipments'), 'in', Eval('active_ids')))]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_shipment_cost_form_shipment_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="shipment_cost_view_list"/>
            <field name="act_window" ref="act_shipment_cost_form_shipment"/>
        </record>
        <record model="ir.action.act_window.view" id="act_shipment_cost_form_shipment_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="shipment_cost_view_form"/>
            <field name="act_window" ref="act_shipment_cost_form_shipment"/>
        </record>
        <record model="ir.action.keyword" id="act_shipment_cost_form_shipment_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">stock.shipment.out,-1</field>
            <field name="action" ref="act_shipment_cost_form_shipment"/>
        </record>
        <record model="ir.action.keyword" id="act_shipment_cost_form_shipment_keyword2">
            <field name="keyword">form_relate</field>
            <field name="model">stock.shipment.out.return,-1</field>
            <field name="action" ref="act_shipment_cost_form_shipment"/>
        </record>

        <record model="ir.model.access" id="access_shipment_cost">
            <field name="model">account.shipment_cost</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_shipment_cost_account">
            <field name="model">account.shipment_cost</field>
            <field name="group" ref="account.group_account"/>
            <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="shipment_cost_cancel_button">
            <field name="model">account.shipment_cost</field>
            <field name="name">cancel</field>
            <field name="string">Cancel</field>
        </record>

        <record model="ir.model.button" id="shipment_cost_post_button">
            <field name="model">account.shipment_cost</field>
            <field name="name">post_wizard</field>
            <field name="string">Post</field>
        </record>

        <record model="ir.model.button" id="shipment_cost_show_button">
            <field name="model">account.shipment_cost</field>
            <field name="name">show</field>
            <field name="string">Show</field>
        </record>

        <record model="ir.model.button" id="shipment_cost_draft_button">
            <field name="model">account.shipment_cost</field>
            <field name="name">draft</field>
            <field name="string">Draft</field>
        </record>

        <record model="ir.rule.group" id="rule_group_shipment_cost_companies">
            <field name="name">User in companies</field>
            <field name="model">account.shipment_cost</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_shipment_cost_companies">
            <field name="domain" eval="[('company', 'in', Eval('companies', []))]" pyson="1"/>
            <field name="rule_group" ref="rule_group_shipment_cost_companies"/>
        </record>

        <record model="ir.action.wizard" id="wizard_shipment_cost_post">
            <field name="name">Post Shipment Cost</field>
            <field name="wiz_name">account.shipment_cost.post</field>
            <field name="model">account.shipment_cost</field>
        </record>

        <record model="ir.action.wizard" id="wizard_shipment_cost_show">
            <field name="name">Show Shipment Cost</field>
            <field name="wiz_name">account.shipment_cost.show</field>
            <field name="model">account.shipment_cost</field>
        </record>

        <record model="ir.ui.view" id="shipment_cost_show_view_form">
            <field name="model">account.shipment_cost.show</field>
            <field name="type">form</field>
            <field name="name">shipment_cost_show_form</field>
        </record>

        <record model="ir.ui.view" id="shipment_cost_show_shipment_view_list">
            <field name="model">account.shipment_cost.show.shipment</field>
            <field name="type">tree</field>
            <field name="name">shipment_cost_show_shipment_list</field>
        </record>

        <record model="ir.ui.view" id="invoice_line_view_form">
            <field name="model">account.invoice.line</field>
            <field name="inherit" ref="account_invoice.invoice_line_view_form"/>
            <field name="name">invoice_line_form</field>
        </record>
    </data>
</tryton>
