| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="res_partner_tree_l10n_it" model="ir.ui.view"> |
| 5 |
<field name="name">res.partner.list.l10n.it</field> |
| 6 |
<field name="mode">primary</field> |
| 7 |
<field name="model">res.partner</field> |
| 8 |
<field name="inherit_id" ref="base.view_partner_tree"/> |
| 9 |
<field name="arch" type="xml"> |
| 10 |
<xpath expr="//field[@name='vat']" position="after"> |
| 11 |
<field name="l10n_it_codice_fiscale"/> |
| 12 |
<field name="l10n_it_pa_index"/> |
| 13 |
</xpath> |
| 14 |
</field> |
| 15 |
</record> |
| 16 |
|
| 17 |
<record id="res_partner_form_l10n_it" model="ir.ui.view"> |
| 18 |
<field name="name">res.partner.form.l10n.it</field> |
| 19 |
<field name="model">res.partner</field> |
| 20 |
<field name="priority">20</field> |
| 21 |
<field name="inherit_id" ref="account.view_partner_property_form"/> |
| 22 |
<field name="arch" type="xml"> |
| 23 |
<data> |
| 24 |
<xpath expr="//field[@name='category_id']" position="after"> |
| 25 |
<field name="l10n_it_pec_email" invisible="'IT' not in fiscal_country_codes or parent_id"/> |
| 26 |
<field name="l10n_it_codice_fiscale" invisible="'IT' not in fiscal_country_codes or parent_id"/> |
| 27 |
<field name="l10n_it_pa_index" invisible="'IT' not in fiscal_country_codes or parent_id"/> |
| 28 |
</xpath> |
| 29 |
</data> |
| 30 |
</field> |
| 31 |
</record> |
| 32 |
|
| 33 |
<record id="res_company_form_l10n_it" model="ir.ui.view"> |
| 34 |
<field name="name">res.company.form.l10n.it</field> |
| 35 |
<field name="model">res.company</field> |
| 36 |
<field name="priority">20</field> |
| 37 |
<field name="inherit_id" ref="base.view_company_form"/> |
| 38 |
<field name="arch" type="xml"> |
| 39 |
<data> |
| 40 |
<xpath expr="//field[@name='vat']" position="after"> |
| 41 |
<field name="l10n_it_codice_fiscale" invisible="country_code != 'IT'"/> |
| 42 |
<field name="l10n_it_tax_system" invisible="country_code != 'IT'"/> |
| 43 |
</xpath> |
| 44 |
<xpath expr="//page" position="after"> |
| 45 |
<page string="Electronic Invoicing" name="electronic_invoicing" invisible="country_code != 'IT'"> |
| 46 |
<group> |
| 47 |
<separator string="Economic and Administrative Index" colspan="4"/> |
| 48 |
<div colspan="4"> |
| 49 |
The seller/provider is a company listed on the register of companies and as |
| 50 |
such must also indicate the registration data on all documents (art. 2250, Italian |
| 51 |
Civil Code) |
| 52 |
</div> |
| 53 |
<group> |
| 54 |
<field name="l10n_it_has_eco_index" string="Company listed on the register of companies"/> |
| 55 |
<field name="l10n_it_eco_index_office" invisible="not l10n_it_has_eco_index"/> |
| 56 |
<field name="l10n_it_eco_index_number" invisible="not l10n_it_has_eco_index"/> |
| 57 |
<field name="l10n_it_eco_index_share_capital" invisible="not l10n_it_has_eco_index"/> |
| 58 |
<field name="l10n_it_eco_index_sole_shareholder" invisible="not l10n_it_has_eco_index"/> |
| 59 |
<field name="l10n_it_eco_index_liquidation_state" invisible="not l10n_it_has_eco_index"/> |
| 60 |
</group> |
| 61 |
</group> |
| 62 |
<group> |
| 63 |
<separator string="Tax representative" colspan="4"/> |
| 64 |
<div colspan="4"> |
| 65 |
The seller/provider is a non-resident subject which carries out transactions in Italy |
| 66 |
with relevance for VAT purposes and which takes avail of a tax representative in Italy |
| 67 |
</div> |
| 68 |
<group> |
| 69 |
<field name="l10n_it_has_tax_representative" string="Company have a tax representative"/> |
| 70 |
<field name="l10n_it_tax_representative_partner_id" invisible="not l10n_it_has_tax_representative"/> |
| 71 |
</group> |
| 72 |
</group> |
| 73 |
</page> |
| 74 |
</xpath> |
| 75 |
</data> |
| 76 |
</field> |
| 77 |
</record> |
| 78 |
|
| 79 |
<record id="view_invoice_tree_inherit" model="ir.ui.view"> |
| 80 |
<field name="name">account.move.list.inherit</field> |
| 81 |
<field name="model">account.move</field> |
| 82 |
<field name="inherit_id" ref="account.view_invoice_tree" /> |
| 83 |
<field name="arch" type="xml"> |
| 84 |
<field name="status_in_payment" position="before"> |
| 85 |
<field name="l10n_it_edi_transaction" optional="hide"/> |
| 86 |
<field name="l10n_it_edi_attachment_name" optional="hide"/> |
| 87 |
<field name="l10n_it_edi_state" optional="hide"/> |
| 88 |
</field> |
| 89 |
</field> |
| 90 |
</record> |
| 91 |
|
| 92 |
<record id="view_account_invoice_filter" model="ir.ui.view"> |
| 93 |
<field name="name">account.invoice.select.inherit</field> |
| 94 |
<field name="model">account.move</field> |
| 95 |
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
| 96 |
<field name="arch" type="xml"> |
| 97 |
<xpath expr="//search/field[@name='journal_id']" position="after"> |
| 98 |
<field name="l10n_it_edi_transaction" groups="base.group_no_one"/> |
| 99 |
<field name="l10n_it_edi_attachment_name" groups="base.group_no_one"/> |
| 100 |
<field name="l10n_it_edi_state" groups="base.group_no_one"/> |
| 101 |
</xpath> |
| 102 |
</field> |
| 103 |
</record> |
| 104 |
|
| 105 |
<record id="account_invoice_form_l10n_it" model="ir.ui.view"> |
| 106 |
<field name="name">account.move.form.l10n.it</field> |
| 107 |
<field name="model">account.move</field> |
| 108 |
<field name="priority">20</field> |
| 109 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 110 |
<field name="arch" type="xml"> |
| 111 |
<data> |
| 112 |
<xpath expr="//header" position="inside"> |
| 113 |
<button name="action_l10n_it_edi_send" |
| 114 |
type="object" |
| 115 |
string="Send Tax Integration" |
| 116 |
invisible="state != 'posted' or not l10n_it_edi_is_self_invoice or is_move_sent or country_code != 'IT'" |
| 117 |
data-hotkey="y"/> |
| 118 |
</xpath> |
| 119 |
<xpath expr="//sheet" position="before"> |
| 120 |
<field name="l10n_it_edi_is_self_invoice" invisible="1"/> |
| 121 |
<div class="alert alert-warning" role="alert" |
| 122 |
invisible="not l10n_it_edi_header |
| 123 |
or state == 'draft' |
| 124 |
or l10n_it_edi_state in ('forwarded', 'accepted_by_pa_partner', 'accepted_by_pa_partner_after_expiry', 'forward_failed')"> |
| 125 |
<div class="p-0 m-0"><i class='fa fa-warning' role="img" title="EDI (Italy)"/><span class="mx-1">E-invoicing (Italy)</span></div> |
| 126 |
<field name="l10n_it_edi_header"/> |
| 127 |
</div> |
| 128 |
</xpath> |
| 129 |
<xpath expr="//button[@name='action_invoice_sent']" position="before"> |
| 130 |
<button |
| 131 |
name="action_check_l10n_it_edi" |
| 132 |
type="object" |
| 133 |
string="Check Sending" |
| 134 |
class="oe_highlight" |
| 135 |
data-hotkey="shift+K" |
| 136 |
invisible="l10n_it_edi_state not in ('being_sent', 'processing', 'forward_attempt')" |
| 137 |
/> |
| 138 |
</xpath> |
| 139 |
<xpath expr="//button[@name='action_invoice_sent']" position="inside"> |
| 140 |
<!-- Make it clear in the button text when we are not in production (e.g., 'Send (Demo)') --> |
| 141 |
<field name="l10n_it_edi_button_label" widget="char"/> |
| 142 |
</xpath> |
| 143 |
<xpath expr="//page[@name='other_info']" position="after"> |
| 144 |
<page string="Electronic Invoicing" |
| 145 |
name="electronic_invoicing" |
| 146 |
invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund') or country_code != 'IT'"> |
| 147 |
<group> |
| 148 |
<group> |
| 149 |
<field name="l10n_it_edi_attachment_name" invisible="1"/> |
| 150 |
<field name="l10n_it_edi_transaction" groups="base.group_no_one" readonly="1"/> |
| 151 |
<field name="l10n_it_edi_attachment_file" widget="binary" filename="l10n_it_edi_attachment_name" groups="base.group_no_one" readonly="1"/> |
| 152 |
<field name="l10n_it_stamp_duty" readonly="state != 'draft'"/> |
| 153 |
<field name="l10n_it_ddt_id" readonly="state != 'draft'" invisible="move_type not in ('out_invoice', 'out_refund')"/> |
| 154 |
<field name="l10n_it_document_type" string="Document Type"/> |
| 155 |
<field name="l10n_it_payment_method" string="Payment Method"/> |
| 156 |
</group> |
| 157 |
<field name="l10n_it_partner_pa" invisible="1"/> |
| 158 |
<group invisible="not l10n_it_partner_pa"> |
| 159 |
<field name="l10n_it_origin_document_type" readonly="state != 'draft'"/> |
| 160 |
<field name="l10n_it_origin_document_name" readonly="state != 'draft'"/> |
| 161 |
<field name="l10n_it_origin_document_date" readonly="state != 'draft'"/> |
| 162 |
<field name="l10n_it_cig" readonly="state != 'draft'"/> |
| 163 |
<field name="l10n_it_cup" readonly="state != 'draft'"/> |
| 164 |
</group> |
| 165 |
</group> |
| 166 |
</page> |
| 167 |
</xpath> |
| 168 |
<xpath expr="//div[@name='journal_div']" position="after"> |
| 169 |
<label for="l10n_it_edi_state" invisible="not l10n_it_edi_state"/> |
| 170 |
<div name="l10n_it_edi_div" class="d-flex" invisible="not l10n_it_edi_state"> |
| 171 |
<field name="l10n_it_edi_state" class="oe_inline"/> |
| 172 |
</div> |
| 173 |
</xpath> |
| 174 |
</data> |
| 175 |
</field> |
| 176 |
</record> |
| 177 |
|
| 178 |
<record id="l10n_it_ddt" model="ir.ui.view"> |
| 179 |
<field name="name">ddt.form.l10n.it</field> |
| 180 |
<field name="model">l10n_it.ddt</field> |
| 181 |
<field name="arch" type="xml"> |
| 182 |
<form> |
| 183 |
<group> |
| 184 |
<field name="name"/> |
| 185 |
<field name="date"/> |
| 186 |
</group> |
| 187 |
</form> |
| 188 |
</field> |
| 189 |
</record> |
| 190 |
|
| 191 |
<record id="l10n_it_ddt_list_view" model="ir.ui.view"> |
| 192 |
<field name="name">l10n_it.ddt.list.view</field> |
| 193 |
<field name="model">l10n_it.ddt</field> |
| 194 |
<field name="arch" type="xml"> |
| 195 |
<list> |
| 196 |
<field name="name"/> |
| 197 |
<field name="date"/> |
| 198 |
</list> |
| 199 |
</field> |
| 200 |
</record> |
| 201 |
|
| 202 |
<record id="action_ddt_account" model="ir.actions.act_window"> |
| 203 |
<field name="name">Transport Document</field> |
| 204 |
<field name="res_model">l10n_it.ddt</field> |
| 205 |
<field name="view_mode">list,form</field> |
| 206 |
<field name="view_id" ref="l10n_it_ddt_list_view"/> |
| 207 |
</record> |
| 208 |
|
| 209 |
<menuitem |
| 210 |
name="DDT" |
| 211 |
parent="account.account_account_menu" |
| 212 |
action="action_ddt_account" |
| 213 |
id="menu_action_ddt_account" |
| 214 |
sequence="15" |
| 215 |
groups="base.group_no_one"/> |
| 216 |
</odoo> |