odoo-addon-l10n-it-edi-extension 18.0.1.0.0.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/l10n_it_edi_extension/README.rst +493 -0
- odoo/addons/l10n_it_edi_extension/__init__.py +951 -0
- odoo/addons/l10n_it_edi_extension/__manifest__.py +37 -0
- odoo/addons/l10n_it_edi_extension/controllers/__init__.py +1 -0
- odoo/addons/l10n_it_edi_extension/controllers/portal.py +27 -0
- odoo/addons/l10n_it_edi_extension/data/FoglioStileAssoSoftware.xsl +3150 -0
- odoo/addons/l10n_it_edi_extension/data/invoice_it_template.xml +50 -0
- odoo/addons/l10n_it_edi_extension/data/res.city.it.code.csv +13898 -0
- odoo/addons/l10n_it_edi_extension/i18n/l10n_it_edi_extension.pot +1167 -0
- odoo/addons/l10n_it_edi_extension/i18n/l10n_it_edi_fatturapa.pot +44 -0
- odoo/addons/l10n_it_edi_extension/models/__init__.py +15 -0
- odoo/addons/l10n_it_edi_extension/models/account_journal.py +152 -0
- odoo/addons/l10n_it_edi_extension/models/account_move.py +765 -0
- odoo/addons/l10n_it_edi_extension/models/account_move_line.py +10 -0
- odoo/addons/l10n_it_edi_extension/models/ir_attachment.py +37 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_activity_progress.py +14 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_article_code.py +15 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_discount_rise_price.py +25 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_line.py +48 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_line_other_data.py +17 -0
- odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_summary_data.py +77 -0
- odoo/addons/l10n_it_edi_extension/models/res_city_it_code.py +83 -0
- odoo/addons/l10n_it_edi_extension/models/res_company.py +62 -0
- odoo/addons/l10n_it_edi_extension/models/res_partner.py +64 -0
- odoo/addons/l10n_it_edi_extension/readme/CONFIGURE.md +45 -0
- odoo/addons/l10n_it_edi_extension/readme/CONTRIBUTORS.md +5 -0
- odoo/addons/l10n_it_edi_extension/readme/DESCRIPTION.md +160 -0
- odoo/addons/l10n_it_edi_extension/security/ir.model.access.csv +14 -0
- odoo/addons/l10n_it_edi_extension/static/description/icon.png +0 -0
- odoo/addons/l10n_it_edi_extension/static/description/index.html +832 -0
- odoo/addons/l10n_it_edi_extension/tests/__init__.py +2 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT01234567890_FPR03.xml +166 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT02780790107_11004.xml +216 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT02780790107_11005.xml +224 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT05979361218_003.xml +107 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/test.png +0 -0
- odoo/addons/l10n_it_edi_extension/tests/import_xmls/xml_import.zip +0 -0
- odoo/addons/l10n_it_edi_extension/tests/test_fiscalcode.py +126 -0
- odoo/addons/l10n_it_edi_extension/tests/test_import_edi_extension_xml.py +350 -0
- odoo/addons/l10n_it_edi_extension/views/company_view.xml +41 -0
- odoo/addons/l10n_it_edi_extension/views/l10n_it_view.xml +164 -0
- odoo/addons/l10n_it_edi_extension/views/res_partner_view.xml +19 -0
- odoo/addons/l10n_it_edi_extension/wizards/__init__.py +2 -0
- odoo/addons/l10n_it_edi_extension/wizards/compute_fc.py +176 -0
- odoo/addons/l10n_it_edi_extension/wizards/compute_fc_view.xml +65 -0
- odoo/addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py +98 -0
- odoo/addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.xml +46 -0
- odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/METADATA +513 -0
- odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/RECORD +51 -0
- odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/WHEEL +5 -0
- odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/top_level.txt +1 -0
@@ -0,0 +1,350 @@
|
|
1
|
+
# Copyright 2024 Simone Rubino - Aion Tech
|
2
|
+
# Copyright 2025 Simone Rubino
|
3
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
4
|
+
|
5
|
+
import base64
|
6
|
+
from datetime import date
|
7
|
+
|
8
|
+
from odoo import tools
|
9
|
+
|
10
|
+
from odoo.addons.l10n_it_edi.tests.common import TestItEdi
|
11
|
+
|
12
|
+
|
13
|
+
class TestFatturaPAXMLValidation(TestItEdi):
|
14
|
+
@classmethod
|
15
|
+
def setUpClass(cls):
|
16
|
+
super().setUpClass()
|
17
|
+
cls.module = "l10n_it_edi_extension"
|
18
|
+
cls.env.company.l10n_edi_it_create_partner = True
|
19
|
+
cls.company.l10n_edi_it_create_partner = True
|
20
|
+
|
21
|
+
def _edi_import_invoice(self, filename):
|
22
|
+
moves = self.env["account.move"]
|
23
|
+
path = f"l10n_it_edi_extension/tests/import_xmls/{filename}"
|
24
|
+
|
25
|
+
with tools.file_open(path, mode="rb") as file:
|
26
|
+
content = file.read()
|
27
|
+
|
28
|
+
attachment = self.env["ir.attachment"].create(
|
29
|
+
{
|
30
|
+
"name": filename,
|
31
|
+
"raw": content,
|
32
|
+
"type": "binary",
|
33
|
+
}
|
34
|
+
)
|
35
|
+
|
36
|
+
if not attachment._is_l10n_it_edi_import_file():
|
37
|
+
attachment.unlink()
|
38
|
+
return False
|
39
|
+
|
40
|
+
for file_data in attachment._decode_edi_l10n_it_edi(filename, content):
|
41
|
+
move = self.env["account.move"].with_company(self.company).create({})
|
42
|
+
attachment.write(
|
43
|
+
{
|
44
|
+
"res_model": "account.move",
|
45
|
+
"res_id": move.id,
|
46
|
+
"res_field": "l10n_it_edi_attachment_file",
|
47
|
+
}
|
48
|
+
)
|
49
|
+
|
50
|
+
move._l10n_it_edi_import_invoice(move, file_data, True)
|
51
|
+
moves |= move
|
52
|
+
|
53
|
+
return moves
|
54
|
+
|
55
|
+
def test_02_xml_import(self):
|
56
|
+
move = self._edi_import_invoice("IT02780790107_11005.xml")
|
57
|
+
move._extend_with_attachments(move.l10n_it_edi_attachment_id, new=True)
|
58
|
+
self.assertEqual(move.ref, "124")
|
59
|
+
self.assertEqual(move.partner_id.name, "Societa' Alpha SRL")
|
60
|
+
self.assertEqual(move.invoice_line_ids[0].tax_ids[0].name, "22% G")
|
61
|
+
self.assertEqual(move.invoice_line_ids[1].tax_ids[0].name, "22% G")
|
62
|
+
self.assertEqual(move.invoice_line_ids[0].tax_ids[0].amount, 22)
|
63
|
+
self.assertEqual(move.invoice_line_ids[1].tax_ids[0].amount, 22)
|
64
|
+
self.assertEqual(move.invoice_line_ids[1].price_unit, 2)
|
65
|
+
self.assertTrue(len(move.l10n_it_edi_line_ids) == 2)
|
66
|
+
for edi_line in move.l10n_it_edi_line_ids:
|
67
|
+
self.assertTrue(edi_line.line_number in (1, 2))
|
68
|
+
if edi_line.line_number == 1:
|
69
|
+
self.assertEqual(edi_line.l10n_it_edi_article_code_ids[0].name, "EAN")
|
70
|
+
self.assertEqual(
|
71
|
+
edi_line.l10n_it_edi_article_code_ids[0].code_val, "12345"
|
72
|
+
)
|
73
|
+
|
74
|
+
def test_03_xml_import(self):
|
75
|
+
move = self._edi_import_invoice("IT05979361218_003.xml")
|
76
|
+
move._extend_with_attachments(move.l10n_it_edi_attachment_id, new=True)
|
77
|
+
self.assertEqual(move.ref, "FT/2015/0008")
|
78
|
+
self.assertEqual(move.l10n_it_edi_sender, "TZ")
|
79
|
+
self.assertEqual(
|
80
|
+
move.l10n_it_edi_line_ids[0].l10n_it_edi_discount_rise_price_ids[0].name,
|
81
|
+
"SC",
|
82
|
+
)
|
83
|
+
self.assertEqual(
|
84
|
+
move.l10n_it_edi_line_ids[0]
|
85
|
+
.l10n_it_edi_discount_rise_price_ids[0]
|
86
|
+
.percentage,
|
87
|
+
10,
|
88
|
+
)
|
89
|
+
self.assertEqual(move.amount_untaxed, 9)
|
90
|
+
self.assertEqual(move.amount_tax, 0)
|
91
|
+
self.assertEqual(move.amount_total, 9)
|
92
|
+
|
93
|
+
def test_04_xml_import(self):
|
94
|
+
move = self._edi_import_invoice("IT02780790107_11004.xml")
|
95
|
+
move._extend_with_attachments(move.l10n_it_edi_attachment_id, new=True)
|
96
|
+
self.assertEqual(move.ref, "123")
|
97
|
+
self.assertEqual(len(move.invoice_line_ids[0].tax_ids), 1)
|
98
|
+
self.assertEqual(move.invoice_line_ids[0].tax_ids[0].name, "22% G")
|
99
|
+
self.assertEqual(move.l10n_it_edi_summary_ids[0].amount_untaxed, 34.00)
|
100
|
+
self.assertEqual(move.l10n_it_edi_summary_ids[0].amount_tax, 7.48)
|
101
|
+
self.assertEqual(move.l10n_it_edi_summary_ids[0].payability, "D")
|
102
|
+
self.assertEqual(move.partner_id.name, "SOCIETA' ALPHA SRL")
|
103
|
+
self.assertEqual(move.partner_id.street, "VIALE ROMA 543")
|
104
|
+
self.assertEqual(move.partner_id.state_id.code, "SS")
|
105
|
+
self.assertEqual(move.partner_id.country_id.code, "IT")
|
106
|
+
self.assertEqual(move.partner_id.vat, "02780790107")
|
107
|
+
self.assertEqual(
|
108
|
+
move.l10n_it_edi_tax_representative_id.name, "Rappresentante fiscale"
|
109
|
+
)
|
110
|
+
self.assertTrue(move.l10n_edi_it_art73)
|
111
|
+
for tag in [
|
112
|
+
"DatiOrdineAcquisto",
|
113
|
+
"DatiContratto",
|
114
|
+
"DatiConvenzione",
|
115
|
+
"DatiRicezione",
|
116
|
+
"DatiTrasporto",
|
117
|
+
]:
|
118
|
+
self.assertTrue(
|
119
|
+
any(tag in str(body) for body in move.mapped("message_ids.body")),
|
120
|
+
f"'{tag}' not found in message bodies",
|
121
|
+
)
|
122
|
+
|
123
|
+
# verify if attached documents are correctly imported
|
124
|
+
attachments = self.env["ir.attachment"].search(
|
125
|
+
[("res_model", "=", "account.move"), ("res_id", "=", move.id)]
|
126
|
+
)
|
127
|
+
self.assertEqual(len(attachments), 1)
|
128
|
+
orig_attachment_path = tools.misc.file_path(
|
129
|
+
"l10n_it_edi_extension/tests/import_xmls/test.png"
|
130
|
+
)
|
131
|
+
with open(orig_attachment_path, "rb") as orig_attachment:
|
132
|
+
orig_attachment_data = orig_attachment.read()
|
133
|
+
self.assertEqual(attachments[0].raw, orig_attachment_data)
|
134
|
+
|
135
|
+
def test_import_zip(self):
|
136
|
+
path = "l10n_it_edi_extension/tests/import_xmls/xml_import.zip"
|
137
|
+
import_file_model = self.env["l10n_it_edi.import_file_wizard"].with_company(
|
138
|
+
self.company
|
139
|
+
)
|
140
|
+
|
141
|
+
with tools.file_open(path, mode="rb") as file:
|
142
|
+
encoded_file = base64.encodebytes(file.read())
|
143
|
+
|
144
|
+
wizard_attachment_import = import_file_model.create(
|
145
|
+
{
|
146
|
+
"l10n_it_edi_attachment_filename": "xml_import.zip",
|
147
|
+
"l10n_it_edi_attachment": encoded_file,
|
148
|
+
}
|
149
|
+
)
|
150
|
+
action = wizard_attachment_import.action_import()
|
151
|
+
|
152
|
+
move_ids = action.get("domain")[0][2]
|
153
|
+
moves = self.env["account.move"].browse(move_ids)
|
154
|
+
out_moves = moves.filtered(lambda m: m.is_sale_document())
|
155
|
+
in_moves = moves.filtered(lambda m: m.is_purchase_document())
|
156
|
+
self.assertEqual(len(out_moves), 6)
|
157
|
+
self.assertEqual(len(in_moves), 36)
|
158
|
+
|
159
|
+
check_invoices_values = {
|
160
|
+
"IT06363391001_00012.xml": [
|
161
|
+
{
|
162
|
+
"invoice_date": date(
|
163
|
+
2020,
|
164
|
+
month=1,
|
165
|
+
day=7,
|
166
|
+
),
|
167
|
+
"invoice_date_due": date(
|
168
|
+
2020,
|
169
|
+
month=2,
|
170
|
+
day=29,
|
171
|
+
),
|
172
|
+
},
|
173
|
+
],
|
174
|
+
"IT06363391001_00009.xml": [
|
175
|
+
{
|
176
|
+
"partner_id": self.env["res.partner"].search(
|
177
|
+
[
|
178
|
+
("name", "=", "Foreign Customer"),
|
179
|
+
],
|
180
|
+
limit=1,
|
181
|
+
),
|
182
|
+
}
|
183
|
+
],
|
184
|
+
}
|
185
|
+
|
186
|
+
for out_move in out_moves:
|
187
|
+
attachment = out_move.l10n_it_edi_attachment_id
|
188
|
+
expected_invoices_values = check_invoices_values.get(attachment.name)
|
189
|
+
if expected_invoices_values is not None:
|
190
|
+
for move, expected_values in zip(
|
191
|
+
out_move,
|
192
|
+
expected_invoices_values,
|
193
|
+
strict=True,
|
194
|
+
):
|
195
|
+
for field, expected_value in expected_values.items():
|
196
|
+
self.assertEqual(
|
197
|
+
getattr(move, field),
|
198
|
+
expected_value,
|
199
|
+
f"Field {field} of invoice {move.display_name} "
|
200
|
+
f"does not match",
|
201
|
+
)
|
202
|
+
|
203
|
+
def test_multiple_invoices(self):
|
204
|
+
"""If an e-invoice contains multiple invoices, they are all created."""
|
205
|
+
# Arrange
|
206
|
+
self.company.l10n_it_codice_fiscale = "03533590174"
|
207
|
+
|
208
|
+
# Assert
|
209
|
+
self._assert_import_invoice(
|
210
|
+
"IT01234567890_FPR03.xml",
|
211
|
+
[
|
212
|
+
{
|
213
|
+
"ref": "123",
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"ref": "456",
|
217
|
+
},
|
218
|
+
],
|
219
|
+
)
|
220
|
+
|
221
|
+
def test_create_partner(self):
|
222
|
+
"""If partner does not exist, it is created during import."""
|
223
|
+
partner_name = "SOCIETA' ALPHA SRL"
|
224
|
+
# pre-condition
|
225
|
+
partner = self.env["res.partner"].search(
|
226
|
+
[
|
227
|
+
("name", "=", partner_name),
|
228
|
+
],
|
229
|
+
limit=1,
|
230
|
+
)
|
231
|
+
self.assertFalse(partner)
|
232
|
+
|
233
|
+
# Act
|
234
|
+
invoice = self._assert_import_invoice("IT02780790107_11004.xml", [{}])
|
235
|
+
|
236
|
+
# Assert
|
237
|
+
partner = invoice.partner_id
|
238
|
+
self.assertEqual(partner.name, partner_name)
|
239
|
+
|
240
|
+
def test_avoid_create_partner(self):
|
241
|
+
"""Partner is not created during import if the setting is disabled."""
|
242
|
+
self.env.company.l10n_edi_it_create_partner = False
|
243
|
+
partner_name = "SOCIETA' BETA SRL"
|
244
|
+
# pre-condition
|
245
|
+
partner = self.env["res.partner"].search(
|
246
|
+
[
|
247
|
+
("name", "=", partner_name),
|
248
|
+
],
|
249
|
+
limit=1,
|
250
|
+
)
|
251
|
+
self.assertFalse(partner)
|
252
|
+
|
253
|
+
# Act
|
254
|
+
invoice = self._assert_import_invoice("IT02780790107_11004.xml", [{}])
|
255
|
+
|
256
|
+
# Assert
|
257
|
+
partner = invoice.partner_id
|
258
|
+
self.assertFalse(partner)
|
259
|
+
|
260
|
+
def test_min_import_detail_level(self):
|
261
|
+
"""If import detail level is Minimum,
|
262
|
+
no line is imported."""
|
263
|
+
# Arrange
|
264
|
+
company = self.company
|
265
|
+
company.l10n_it_edi_import_detail_level = "min"
|
266
|
+
|
267
|
+
# Act
|
268
|
+
invoice = self._assert_import_invoice(
|
269
|
+
"IT02780790107_11004.xml",
|
270
|
+
[
|
271
|
+
{
|
272
|
+
"company_id": company.id,
|
273
|
+
},
|
274
|
+
],
|
275
|
+
)
|
276
|
+
|
277
|
+
# Assert
|
278
|
+
self.assertFalse(invoice.invoice_line_ids)
|
279
|
+
|
280
|
+
def test_tax_import_detail_level(self):
|
281
|
+
"""If import detail level is Tax rate,
|
282
|
+
summary lines are imported."""
|
283
|
+
# Arrange
|
284
|
+
company = self.company
|
285
|
+
company.l10n_it_edi_import_detail_level = "tax"
|
286
|
+
|
287
|
+
# Act
|
288
|
+
invoice = self._assert_import_invoice(
|
289
|
+
"IT02780790107_11004.xml",
|
290
|
+
[
|
291
|
+
{
|
292
|
+
"company_id": company.id,
|
293
|
+
},
|
294
|
+
],
|
295
|
+
)
|
296
|
+
|
297
|
+
# Assert
|
298
|
+
self.assertEqual(len(invoice.invoice_line_ids), 1)
|
299
|
+
|
300
|
+
def test_max_import_detail_level(self):
|
301
|
+
"""If import detail level is Maximum,
|
302
|
+
all lines are imported."""
|
303
|
+
# Arrange
|
304
|
+
company = self.company
|
305
|
+
# pre-condition
|
306
|
+
self.assertEqual(company.l10n_it_edi_import_detail_level, "max")
|
307
|
+
|
308
|
+
# Act
|
309
|
+
invoice = self._assert_import_invoice(
|
310
|
+
"IT02780790107_11004.xml",
|
311
|
+
[
|
312
|
+
{
|
313
|
+
"company_id": company.id,
|
314
|
+
},
|
315
|
+
],
|
316
|
+
)
|
317
|
+
|
318
|
+
# Assert
|
319
|
+
self.assertEqual(len(invoice.invoice_line_ids), 2)
|
320
|
+
|
321
|
+
def test_partner_import_detail_level(self):
|
322
|
+
"""If import detail level is Maximum in the Company
|
323
|
+
and minimum in the partner,
|
324
|
+
the invoice is imported with minimum detail level."""
|
325
|
+
# Arrange
|
326
|
+
company = self.company
|
327
|
+
partner = self.env["res.partner"].create(
|
328
|
+
{
|
329
|
+
"name": "Test partner",
|
330
|
+
"vat": "02780790107",
|
331
|
+
"l10n_it_edi_import_detail_level": "min",
|
332
|
+
},
|
333
|
+
)
|
334
|
+
# pre-condition
|
335
|
+
self.assertEqual(company.l10n_it_edi_import_detail_level, "max")
|
336
|
+
self.assertEqual(partner.l10n_it_edi_import_detail_level, "min")
|
337
|
+
|
338
|
+
# Act
|
339
|
+
invoice = self._assert_import_invoice(
|
340
|
+
"IT02780790107_11004.xml",
|
341
|
+
[
|
342
|
+
{
|
343
|
+
"company_id": company.id,
|
344
|
+
"partner_id": partner.id,
|
345
|
+
},
|
346
|
+
],
|
347
|
+
)
|
348
|
+
|
349
|
+
# Assert
|
350
|
+
self.assertFalse(invoice.invoice_line_ids)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<odoo>
|
3
|
+
<record model="ir.ui.view" id="view_account_config_settings_create_partner">
|
4
|
+
<field name="name">view_account_config_settings_create_partner</field>
|
5
|
+
<field name="model">res.config.settings</field>
|
6
|
+
<field name="inherit_id" ref="l10n_it_edi.res_config_settings_view_form" />
|
7
|
+
<field name="arch" type="xml">
|
8
|
+
<setting id="italian_edi" position="after">
|
9
|
+
<setting
|
10
|
+
id="l10n_edi_it_create_partner"
|
11
|
+
help="Automatically create the partner if it does not exist during the import of Electronic Invoices."
|
12
|
+
company_dependent="1"
|
13
|
+
>
|
14
|
+
<field name="l10n_edi_it_create_partner" />
|
15
|
+
</setting>
|
16
|
+
<setting id="l10n_it_edi_import_detail_level">
|
17
|
+
<div class="group-content">
|
18
|
+
<span
|
19
|
+
class="o_form_label"
|
20
|
+
title="Minimum: the bill is created with no lines; the user will have to create them, according to what specified in the electronic bill.
|
21
|
+
Tax rate: every tax rate present in the electronic bill will create a line in the bill.
|
22
|
+
Maximum (default): every line contained in the electronic bill will create a line in the bill."
|
23
|
+
>
|
24
|
+
E-bills import detail level
|
25
|
+
</span>
|
26
|
+
<span
|
27
|
+
class="fa fa-lg fa-building-o"
|
28
|
+
title="Values set here are company-specific."
|
29
|
+
/>
|
30
|
+
<div class="text-muted">
|
31
|
+
How lines are converted from the e-bill to the bill.
|
32
|
+
<br />
|
33
|
+
This setting can be overridden in each supplier.
|
34
|
+
</div>
|
35
|
+
<field name="l10n_it_edi_import_detail_level" />
|
36
|
+
</div>
|
37
|
+
</setting>
|
38
|
+
</setting>
|
39
|
+
</field>
|
40
|
+
</record>
|
41
|
+
</odoo>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<odoo>
|
3
|
+
<record id="account_invoice_form_l10n_it_inherit_view" model="ir.ui.view">
|
4
|
+
<field name="name">account.move.form.l10n.it.inherit.view</field>
|
5
|
+
<field name="model">account.move</field>
|
6
|
+
<field name="inherit_id" ref="l10n_it_edi.account_invoice_form_l10n_it" />
|
7
|
+
<field name="arch" type="xml">
|
8
|
+
<xpath expr="//div[@role='alert']" position="after">
|
9
|
+
<div
|
10
|
+
class="alert alert-info"
|
11
|
+
role="alert"
|
12
|
+
invisible="l10n_it_edi_validation_message == ''"
|
13
|
+
>
|
14
|
+
<field
|
15
|
+
name="l10n_it_edi_validation_message"
|
16
|
+
decoration-bf="1"
|
17
|
+
nolabel="1"
|
18
|
+
/>
|
19
|
+
</div>
|
20
|
+
</xpath>
|
21
|
+
<xpath
|
22
|
+
expr="//field[@name='invoice_line_ids']/list/field[@name='analytic_distribution']"
|
23
|
+
position="after"
|
24
|
+
>
|
25
|
+
<field name="l10n_it_edi_admin_ref" optional="hide" />
|
26
|
+
</xpath>
|
27
|
+
<xpath
|
28
|
+
expr="//page[@name='electronic_invoicing']//field[@name='l10n_it_edi_attachment_id']"
|
29
|
+
position="attributes"
|
30
|
+
>
|
31
|
+
<attribute name="invisible">1</attribute>
|
32
|
+
</xpath>
|
33
|
+
<xpath
|
34
|
+
expr="//page[@name='electronic_invoicing']//field[@name='l10n_it_edi_attachment_id']"
|
35
|
+
position="after"
|
36
|
+
>
|
37
|
+
<label
|
38
|
+
for="l10n_it_edi_attachment_id"
|
39
|
+
class="oe_inline"
|
40
|
+
invisible="not l10n_it_edi_attachment_id"
|
41
|
+
/>
|
42
|
+
<div class="o_row" invisible="not l10n_it_edi_attachment_id">
|
43
|
+
<field
|
44
|
+
name="l10n_it_edi_attachment_id"
|
45
|
+
groups="account.group_account_invoice"
|
46
|
+
readonly="1"
|
47
|
+
/>
|
48
|
+
<button
|
49
|
+
name="action_l10n_it_edi_attachment_preview"
|
50
|
+
type="object"
|
51
|
+
string="Preview FPA"
|
52
|
+
/>
|
53
|
+
</div>
|
54
|
+
</xpath>
|
55
|
+
<xpath expr="//page[@name='electronic_invoicing']" position="after">
|
56
|
+
<page
|
57
|
+
string="E-Invoice Details"
|
58
|
+
invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund') or country_code != 'IT'"
|
59
|
+
>
|
60
|
+
<group>
|
61
|
+
<group string="Amount Summary">
|
62
|
+
<field name="l10n_it_edi_amount_untaxed" />
|
63
|
+
<field name="l10n_it_edi_amount_tax" />
|
64
|
+
<field name="l10n_it_edi_amount_total" />
|
65
|
+
</group>
|
66
|
+
</group>
|
67
|
+
<separator name="Lines Detail" />
|
68
|
+
<field name="l10n_it_edi_line_ids">
|
69
|
+
<list>
|
70
|
+
<field name="line_number" />
|
71
|
+
<field name="name" />
|
72
|
+
<field name="qty" />
|
73
|
+
<field name="uom" />
|
74
|
+
<field name="unit_price" />
|
75
|
+
<field name="tax_amount" />
|
76
|
+
<field name="total_price" />
|
77
|
+
</list>
|
78
|
+
<form>
|
79
|
+
<group>
|
80
|
+
<group>
|
81
|
+
<field name="line_number" />
|
82
|
+
<field name="name" />
|
83
|
+
<field name="qty" />
|
84
|
+
<field name="uom" />
|
85
|
+
<field name="unit_price" />
|
86
|
+
<field name="tax_amount" />
|
87
|
+
<field name="total_price" />
|
88
|
+
</group>
|
89
|
+
<group>
|
90
|
+
<field name="service_type" />
|
91
|
+
<field name="period_start_date" />
|
92
|
+
<field name="period_end_date" />
|
93
|
+
<field name="wt_amount" />
|
94
|
+
<field name="tax_kind" />
|
95
|
+
</group>
|
96
|
+
</group>
|
97
|
+
<separator string="Articles Code" />
|
98
|
+
<field name="l10n_it_edi_article_code_ids" />
|
99
|
+
<separator string="Discount Supplement" />
|
100
|
+
<field name="l10n_it_edi_discount_rise_price_ids" />
|
101
|
+
<separator string="Other Administrative Data" />
|
102
|
+
<field name="l10n_it_edi_line_other_data_ids" />
|
103
|
+
</form>
|
104
|
+
</field>
|
105
|
+
<separator name="Summary Data" />
|
106
|
+
<field name="l10n_it_edi_summary_ids">
|
107
|
+
<list editable="bottom">
|
108
|
+
<field name="tax_rate" />
|
109
|
+
<field name="non_taxable_nature" />
|
110
|
+
<field name="incidental_charges" readonly="1" />
|
111
|
+
<field name="rounding" />
|
112
|
+
<field name="amount_untaxed" />
|
113
|
+
<field name="amount_tax" />
|
114
|
+
<field name="payability" />
|
115
|
+
<field name="law_reference" />
|
116
|
+
</list>
|
117
|
+
</field>
|
118
|
+
<separator name="Progress Data" />
|
119
|
+
<field name="l10n_it_edi_activity_progress_ids">
|
120
|
+
<list>
|
121
|
+
<field name="activity_progress" />
|
122
|
+
</list>
|
123
|
+
</field>
|
124
|
+
<group>
|
125
|
+
<group string="Stable Organization">
|
126
|
+
<field
|
127
|
+
name="l10n_it_edi_stabile_organizzazione_indirizzo"
|
128
|
+
/>
|
129
|
+
<field name="l10n_it_edi_stabile_organizzazione_civico" />
|
130
|
+
<field name="l10n_it_edi_stabile_organizzazione_cap" />
|
131
|
+
<field name="l10n_it_edi_stabile_organizzazione_comune" />
|
132
|
+
<field
|
133
|
+
name="l10n_it_edi_stabile_organizzazione_provincia"
|
134
|
+
/>
|
135
|
+
<field name="l10n_it_edi_stabile_organizzazione_nazione" />
|
136
|
+
</group>
|
137
|
+
</group>
|
138
|
+
<group>
|
139
|
+
<group string="General Data">
|
140
|
+
<field name="l10n_it_edi_rounding" widget="monetary" />
|
141
|
+
<field name="l10n_edi_it_art73" />
|
142
|
+
</group>
|
143
|
+
</group>
|
144
|
+
</page>
|
145
|
+
</xpath>
|
146
|
+
</field>
|
147
|
+
</record>
|
148
|
+
|
149
|
+
<record id="res_company_form_l10n_it_inherit_view" model="ir.ui.view">
|
150
|
+
<field name="name">res.company.form.l10n.it.inherit.view</field>
|
151
|
+
<field name="model">res.company</field>
|
152
|
+
<field name="inherit_id" ref="l10n_it_edi.res_company_form_l10n_it" />
|
153
|
+
<field name="arch" type="xml">
|
154
|
+
<xpath expr="//field[@name='l10n_it_tax_system']" position="after">
|
155
|
+
<field name="l10n_edi_it_art73" invisible="country_code != 'IT'" />
|
156
|
+
<field name="l10n_edi_it_admin_ref" invisible="country_code != 'IT'" />
|
157
|
+
<field
|
158
|
+
name="l10n_edi_it_stable_organization"
|
159
|
+
invisible="country_code != 'IT'"
|
160
|
+
/>
|
161
|
+
</xpath>
|
162
|
+
</field>
|
163
|
+
</record>
|
164
|
+
</odoo>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<odoo>
|
3
|
+
<record id="res_partner_form_inherit_view" model="ir.ui.view">
|
4
|
+
<field name="name">res.partner.form.inherit.view</field>
|
5
|
+
<field name="model">res.partner</field>
|
6
|
+
<field name="inherit_id" ref="account.view_partner_property_form" />
|
7
|
+
<field name="arch" type="xml">
|
8
|
+
<xpath expr="//group[@id='invoice_send_settings']" position="inside">
|
9
|
+
<field name="l10n_edi_it_eori_code" />
|
10
|
+
<field name="l10n_edi_it_electronic_invoice_no_contact_update" />
|
11
|
+
<field name="l10n_edi_it_register" />
|
12
|
+
<field name="l10n_edi_it_register_province_id" />
|
13
|
+
<field name="l10n_edi_it_register_code" />
|
14
|
+
<field name="l10n_edi_it_register_regdate" />
|
15
|
+
<field name="l10n_it_edi_import_detail_level" />
|
16
|
+
</xpath>
|
17
|
+
</field>
|
18
|
+
</record>
|
19
|
+
</odoo>
|