<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo>

<record id="view_move_form_inherit" model="ir.ui.view">
    <field name="model">account.move</field>
    <field name="inherit_id" ref="account.view_move_form"/>
    <field name="arch" type="xml">
        <button name="button_draft" position="before">
            <button name="prepare_update_wizard" type="object" string="Update Invoice" groups="account.group_account_invoice" attrs="{'invisible': ['|', ('state', '!=', 'posted'), ('move_type', '=', 'entry')]}"/>
            <button name="prepare_update_wizard" type="object" string="Update Entry" groups="account.group_account_invoice" attrs="{'invisible': ['|', ('state', '!=', 'posted'), ('move_type', '!=', 'entry')]}"/>
        </button>
    </field>
</record>

</odoo>
