| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="view_account_invoice_filter" model="ir.ui.view"> |
| 5 |
<field name="name">account.invoice.select</field> |
| 6 |
<field name="model">account.move</field> |
| 7 |
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
| 8 |
<field name="arch" type="xml"> |
| 9 |
<xpath expr="//search/field[@name='journal_id']" position="after"> |
| 10 |
<field name="l10n_it_edi_doi_id"/> |
| 11 |
</xpath> |
| 12 |
<xpath expr="//filter[@name='out_refund']" position="after"> |
| 13 |
<filter string="Exceeded Declaration of Intent" |
| 14 |
name="l10n_it_edi_doi_declaration_of_intent_exceeded" |
| 15 |
domain="[('l10n_it_edi_doi_id.remaining','<', 0)]"/> |
| 16 |
</xpath> |
| 17 |
<xpath expr="//group" position="inside"> |
| 18 |
<filter string="Declaration of Intent" |
| 19 |
name="l10n_it_edi_doi_declaration_of_intent" |
| 20 |
context="{'group_by':'l10n_it_edi_doi_id'}"/> |
| 21 |
</xpath> |
| 22 |
</field> |
| 23 |
</record> |
| 24 |
|
| 25 |
<record id="view_move_tree" model="ir.ui.view"> |
| 26 |
<field name="name">account.move.list</field> |
| 27 |
<field name="model">account.move</field> |
| 28 |
<field name="arch" type="xml"> |
| 29 |
<list string="Invoices" sample="1" decoration-info="state == 'draft'" expand="context.get('expand', False)"> |
| 30 |
<field name="made_sequence_gap" column_invisible="True"/> |
| 31 |
<field name="name" decoration-bf="1" decoration-danger="made_sequence_gap"/> |
| 32 |
<field name="invoice_partner_display_name" string="Customer"/> |
| 33 |
<field name="invoice_date" string="Invoice Date"/> |
| 34 |
<field name="date" string="Accounting Date" optional="hidden"/> |
| 35 |
<field name="currency_id" column_invisible="True"/> |
| 36 |
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/> |
| 37 |
<field name="l10n_it_edi_doi_amount" decoration-bf="1" sum="Total" string="Tax excluded"/> |
| 38 |
</list> |
| 39 |
</field> |
| 40 |
</record> |
| 41 |
|
| 42 |
<record id="view_move_form" model="ir.ui.view"> |
| 43 |
<field name="name">account.move.form</field> |
| 44 |
<field name="model">account.move</field> |
| 45 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 46 |
<field name="arch" type="xml"> |
| 47 |
<div name="button_box" position="inside"> |
| 48 |
<button groups="account.group_account_invoice" |
| 49 |
type="object" |
| 50 |
class="oe_stat_button" |
| 51 |
name="action_open_declaration_of_intent" |
| 52 |
icon="fa-list" |
| 53 |
invisible="not l10n_it_edi_doi_id"> |
| 54 |
<div class="o_field_widget o_stat_info"> |
| 55 |
<span class="o_stat_text">Declaration of Intent</span> |
| 56 |
</div> |
| 57 |
</button> |
| 58 |
</div> |
| 59 |
<xpath expr="//header" position="after"> |
| 60 |
<div class="alert alert-warning mb-0" role="alert" |
| 61 |
invisible="not l10n_it_edi_doi_warning"> |
| 62 |
<field name="l10n_it_edi_doi_warning"/> |
| 63 |
</div> |
| 64 |
</xpath> |
| 65 |
<xpath expr="//field[@name='fiscal_position_id']" position="before"> |
| 66 |
<field name="l10n_it_edi_doi_use" invisible="True"/> |
| 67 |
<field name="l10n_it_edi_doi_id" |
| 68 |
invisible="not l10n_it_edi_doi_use" |
| 69 |
readonly="state != 'draft'" |
| 70 |
options='{"no_quick_create": True}' |
| 71 |
domain="[ |
| 72 |
('state', '!=', 'draft'), |
| 73 |
('company_id', '=', company_id), |
| 74 |
('currency_id', '=', currency_id), |
| 75 |
('partner_id', '=', commercial_partner_id)]"/> |
| 76 |
</xpath> |
| 77 |
</field> |
| 78 |
</record> |
| 79 |
|
| 80 |
</odoo> |