104 lines
4.8 KiB
XML
104 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2015-2024 Akretion France (https://www.akretion.com/)
|
|
@author: 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" model="ir.ui.view">
|
|
<field name="name">account_usability.account.move.form</field>
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_move_form"/>
|
|
<field name="arch" type="xml">
|
|
<button id="account_invoice_payment_btn" position="attributes">
|
|
<attribute name="class">btn-default</attribute>
|
|
</button>
|
|
<button name="action_register_payment" position="before">
|
|
<button name="%(account.account_invoices)d" type="action" string="Print" invisible="move_type not in ('out_invoice', 'out_refund')"/>
|
|
</button>
|
|
<button name="preview_invoice" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</button>
|
|
<!-- move field is_move_sent and make it visible -->
|
|
<field name="is_move_sent" position="replace"/>
|
|
<field name="invoice_origin" position="attributes">
|
|
<attribute name="invisible">0</attribute>
|
|
</field>
|
|
<field name="invoice_origin" position="after">
|
|
<field name="is_move_sent" invisible="move_type not in ('out_invoice', 'out_refund')"/>
|
|
</field>
|
|
<xpath expr="//field[@name='line_ids']/list/field[@name='tax_tag_ids']" position="after">
|
|
<field name="matching_number" optional="show"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='invoice_line_ids']/list/field[@name='product_id']" position="after">
|
|
<field name="product_barcode" optional="hide"/>
|
|
</xpath>
|
|
<!--
|
|
<field name="invoice_source_email" position="after">
|
|
<field name="blocked"/>
|
|
</field>
|
|
<div role="alert" position="after">
|
|
<div id="warn_blocked" groups="account.group_account_invoice,account.group_account_readonly"
|
|
class="alert alert-warning" role="alert" style="margin-bottom:0px;"
|
|
attrs="{'invisible': ['|', ('move_type', 'not in', ('in_invoice', 'in_refund', 'out_invoice', 'out_refund')), ('blocked', '=', False)]}">
|
|
This <field name="move_type"/> is marked as <b>disputed</b>.
|
|
</div>
|
|
</div> -->
|
|
<xpath expr="//field[@name='duplicated_ref_ids']/.." position="attributes">
|
|
<!-- show duplicate warning not only in draft state, but also in posted state -->
|
|
<attribute name="invisible">not duplicated_ref_ids</attribute>
|
|
</xpath>
|
|
<button name="button_cancel" invisible="not id or state != 'draft' or move_type != 'entry'" position="attributes">
|
|
<attribute name="confirm">Are you sure you want to cancel this journal entry?</attribute>
|
|
</button>
|
|
<button name="button_cancel" invisible="not id or state != 'draft' or move_type == 'entry'" position="attributes">
|
|
<attribute name="confirm">Are you sure you want to cancel this invoice?</attribute>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_invoice_tree" model="ir.ui.view">
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_invoice_tree"/>
|
|
<field name="arch" type="xml">
|
|
<field name="amount_residual_signed" position="attributes">
|
|
<!-- switch from hide to show -->
|
|
<attribute name="optional">show</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_account_invoice_filter" model="ir.ui.view">
|
|
<field name="name">account_usability.account.move.search</field>
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
|
|
<field name="arch" type="xml">
|
|
<filter name="due_date" position="after">
|
|
<separator/>
|
|
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
|
|
<!-- <filter name="dispute" string="Dispute" domain="[('blocked', '=', True)]"/> -->
|
|
</filter>
|
|
<filter name="partner" position="before">
|
|
<filter name="commercial_partner_groupby" string="Commercial Partner" context="{'group_by': 'commercial_partner_id'}"/>
|
|
</filter>
|
|
<filter name="status" position="after">
|
|
<filter name="payment_state_groupby" string="Payment Status" context="{'group_by': 'payment_state'}"/>
|
|
</filter>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_account_move_filter" model="ir.ui.view">
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_account_move_filter"/>
|
|
<field name="arch" type="xml">
|
|
<field name="journal_id" position="after">
|
|
<field name="search_account_id"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
</odoo>
|