| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
|
| 5 |
<record id="view_account_move_filter" model="ir.ui.view"> |
| 6 |
<field name="name">account.move.select</field> |
| 7 |
<field name="model">account.move</field> |
| 8 |
<field name="inherit_id" ref="account.view_account_move_filter"/> |
| 9 |
<field name="arch" type="xml"> |
| 10 |
<xpath expr="//filter[@name='status']" position="inside"> |
| 11 |
<filter string="Veri*Factu State" |
| 12 |
name="l10n_es_edi_verifactu_state" |
| 13 |
context="{'group_by': 'l10n_es_edi_verifactu_state'}"/> |
| 14 |
</xpath> |
| 15 |
</field> |
| 16 |
</record> |
| 17 |
|
| 18 |
<record id="view_account_invoice_filter" model="ir.ui.view"> |
| 19 |
<field name="name">account.invoice.select</field> |
| 20 |
<field name="model">account.move</field> |
| 21 |
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
| 22 |
<field name="arch" type="xml"> |
| 23 |
<xpath expr="//filter[@name='status']" position="inside"> |
| 24 |
<filter string="Veri*Factu State" |
| 25 |
name="l10n_es_edi_verifactu_state" |
| 26 |
context="{'group_by': 'l10n_es_edi_verifactu_state'}"/> |
| 27 |
</xpath> |
| 28 |
</field> |
| 29 |
</record> |
| 30 |
|
| 31 |
<record id="view_move_tree" model="ir.ui.view"> |
| 32 |
<field name="name">account.move.tree</field> |
| 33 |
<field name="model">account.move</field> |
| 34 |
<field name="inherit_id" ref="account.view_move_tree"/> |
| 35 |
<field name="arch" type="xml"> |
| 36 |
<field name="state" position="after"> |
| 37 |
<field name="l10n_es_edi_verifactu_state" widget="badge" |
| 38 |
decoration-danger="l10n_es_edi_verifactu_state not in ('cancelled', 'accepted', 'registered_with_errors')" |
| 39 |
decoration-warning="l10n_es_edi_verifactu_state == 'registered_with_errors'" |
| 40 |
decoration-success="l10n_es_edi_verifactu_state == 'accepted'" |
| 41 |
decoration-muted="l10n_es_edi_verifactu_state == 'cancelled'" |
| 42 |
optional="hide"/> |
| 43 |
</field> |
| 44 |
</field> |
| 45 |
</record> |
| 46 |
|
| 47 |
<record id="view_invoice_tree" model="ir.ui.view"> |
| 48 |
<field name="name">account.invoice.tree</field> |
| 49 |
<field name="model">account.move</field> |
| 50 |
<field name="inherit_id" ref="account.view_invoice_tree"/> |
| 51 |
<field name="arch" type="xml"> |
| 52 |
<field name="status_in_payment" position="after"> |
| 53 |
<field name="l10n_es_edi_verifactu_state" widget="badge" |
| 54 |
decoration-danger="l10n_es_edi_verifactu_state not in ('cancelled', 'accepted', 'registered_with_errors')" |
| 55 |
decoration-warning="l10n_es_edi_verifactu_state == 'registered_with_errors'" |
| 56 |
decoration-success="l10n_es_edi_verifactu_state == 'accepted'" |
| 57 |
decoration-muted="l10n_es_edi_verifactu_state == 'cancelled'" |
| 58 |
optional="hide"/> |
| 59 |
</field> |
| 60 |
</field> |
| 61 |
</record> |
| 62 |
|
| 63 |
<record id="view_move_form_inherit_l10n_es_edi_verifactu" model="ir.ui.view"> |
| 64 |
<field name="name">account.move.form.inherit.l10n_es_edi_verifactu</field> |
| 65 |
<field name="model">account.move</field> |
| 66 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 67 |
<field name="arch" type="xml"> |
| 68 |
<xpath expr="//header" position="after"> |
| 69 |
<div class="alert alert-info" role="alert" |
| 70 |
invisible="not l10n_es_edi_verifactu_warning or l10n_es_edi_verifactu_warning_level != 'info'"> |
| 71 |
<field class="d-inline-block" name="l10n_es_edi_verifactu_warning"/> |
| 72 |
</div> |
| 73 |
<div class="alert alert-warning" role="alert" |
| 74 |
invisible="not l10n_es_edi_verifactu_warning or l10n_es_edi_verifactu_warning_level != 'warning'"> |
| 75 |
<field class="d-inline-block" name="l10n_es_edi_verifactu_warning"/> |
| 76 |
</div> |
| 77 |
<div class="alert alert-danger" role="alert" |
| 78 |
invisible="not l10n_es_edi_verifactu_warning or l10n_es_edi_verifactu_warning_level != 'danger'"> |
| 79 |
<field class="d-inline-block" name="l10n_es_edi_verifactu_warning"/> |
| 80 |
</div> |
| 81 |
</xpath> |
| 82 |
<xpath expr="//button[@name='button_cancel']" position="after"> |
| 83 |
<button name="l10n_es_edi_verifactu_button_cancel" |
| 84 |
string="Request Veri*Factu Cancellation" |
| 85 |
type="object" |
| 86 |
groups="account.group_account_invoice" |
| 87 |
invisible="not l10n_es_edi_verifactu_show_cancel_button"/> |
| 88 |
</xpath> |
| 89 |
<xpath expr="//notebook" position="inside"> |
| 90 |
<page |
| 91 |
id="verifactu_tab" |
| 92 |
string="Veri*Factu" |
| 93 |
invisible="not l10n_es_edi_verifactu_required and not l10n_es_edi_verifactu_document_ids" |
| 94 |
> |
| 95 |
<group> |
| 96 |
<field name="l10n_es_edi_verifactu_refund_reason" |
| 97 |
invisible="move_type == 'out_invoice' and not l10n_es_edi_verifactu_substituted_entry_id" |
| 98 |
readonly="state != 'draft'"/> |
| 99 |
<field name="l10n_es_edi_verifactu_substituted_entry_id" invisible="not l10n_es_edi_verifactu_substituted_entry_id"/> |
| 100 |
<field name="reversed_entry_id" invisible="not reversed_entry_id"/> |
| 101 |
<field name="l10n_es_edi_verifactu_available_clave_regimens" invisible="1"/> |
| 102 |
<field name="l10n_es_edi_verifactu_clave_regimen" |
| 103 |
readonly="state != 'draft'" |
| 104 |
widget="dynamic_selection" |
| 105 |
options="{'available_field': 'l10n_es_edi_verifactu_available_clave_regimens'}"/> |
| 106 |
<field name="l10n_es_edi_verifactu_state" |
| 107 |
invisible="not l10n_es_edi_verifactu_required and not l10n_es_edi_verifactu_state"/> |
| 108 |
</group> |
| 109 |
<group string="Veri*Factu Documents"> |
| 110 |
<field name="l10n_es_edi_verifactu_document_ids" |
| 111 |
colspan="2" |
| 112 |
nolabel="1" |
| 113 |
readonly="True"> |
| 114 |
<list string="Veri*Factu Documents"> |
| 115 |
<field name="create_date"/> |
| 116 |
<field name="document_type"/> |
| 117 |
<field name="state" widget="badge" |
| 118 |
decoration-danger="state not in ('accepted', 'registered_with_errors')" |
| 119 |
decoration-warning="state == 'registered_with_errors'" |
| 120 |
decoration-success="state == 'accepted'"/> |
| 121 |
</list> |
| 122 |
</field> |
| 123 |
</group> |
| 124 |
</page> |
| 125 |
</xpath> |
| 126 |
</field> |
| 127 |
</record> |
| 128 |
</data> |
| 129 |
</odoo> |