<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

    <record id="view_account_renumber_form" model="ir.ui.view">
        <field name="name">account_renumber.form</field>
        <field name="model">wizard.renumber</field>
        <field name="arch" type="xml">
            <form string="Renumber Account Moves">
                <p>This wizard will help you renumber entries in one or more journals.</p>
                <p>Posted moves from those journals will be sorted by date and then assigned sequential numbers using their journal sequence.</p>
                <group>
                    <group string="General Data">
                        <field name="number_next"/>
                    </group>
                    <group string="Date ranges">
                        <field name="date_from"/>
                        <field name="date_to"/>
                    </group>
                </group>
                <group string="Journals to consider">
                    <field name="journal_ids" editable="top"/>
                </group>
                <footer>
                    <button name="renumber"
                            string="Renumber"
                            type="object"
                            class="oe_highlight"/>
                    <button special="cancel"
                            string="Cancel"
                            class="oe_link"/>
                </footer>
            </form>
        </field>
    </record>

    <record id="action_account_renumber" model="ir.actions.act_window">
        <field name="name">Renumber Journal Entries</field>
        <field name="res_model">wizard.renumber</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="view_account_renumber_form"/>
        <field name="target">new</field>
    </record>

    <menuitem id="menu_account_renumber"
              parent="account.menu_finance_entries"
              action="action_account_renumber"
              groups="account.group_account_manager"/>

</odoo>
