<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!--
            check option in journal
        -->

        <record id="view_account_journal_form" model="ir.ui.view">
            <field name="name">account.journal.form</field>
            <field name="model">account.journal</field>
            <field name="inherit_id" ref="account.view_account_journal_form" />
            <field name="arch" type="xml">
                <field name="type" />
                <field name="entry_posted" position="after">
                    <field name="allow_check_writing" attrs="{'readonly':[('type','!=','bank')]}" />
                    <field name="use_preprint_check" attrs="{'readonly':[('type','!=','bank')]}" />
                </field>
            </field>
        </record>

        <!--
            check format option in company
        -->

        <record id="check_format_company" model="ir.ui.view">
            <field name="name">res.company.check.format</field>
            <field name="model">res.company</field>
            <field name="priority">17</field>
            <field name="inherit_id" ref="base.view_company_form"/>
            <field name="arch" type="xml">
                <xpath expr="//group[@name='account_grp']" position="inside">
                    <field name="check_layout"/>
                </xpath>
            </field>
       </record>
    </data>
</openerp>
