odoo-addon-l10n-it-edi-related-document 18.0.1.0.0.3__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.
Files changed (23) hide show
  1. odoo/addons/l10n_it_edi_related_document/README.rst +95 -0
  2. odoo/addons/l10n_it_edi_related_document/__init__.py +26 -0
  3. odoo/addons/l10n_it_edi_related_document/__manifest__.py +21 -0
  4. odoo/addons/l10n_it_edi_related_document/data/invoice_it_template.xml +13 -0
  5. odoo/addons/l10n_it_edi_related_document/i18n/l10n_it_edi_related_document.pot +148 -0
  6. odoo/addons/l10n_it_edi_related_document/models/__init__.py +4 -0
  7. odoo/addons/l10n_it_edi_related_document/models/account_move.py +134 -0
  8. odoo/addons/l10n_it_edi_related_document/models/account_move_line.py +12 -0
  9. odoo/addons/l10n_it_edi_related_document/readme/CONTRIBUTORS.md +1 -0
  10. odoo/addons/l10n_it_edi_related_document/readme/DESCRIPTION.md +19 -0
  11. odoo/addons/l10n_it_edi_related_document/security/ir.model.access.csv +2 -0
  12. odoo/addons/l10n_it_edi_related_document/static/description/icon.png +0 -0
  13. odoo/addons/l10n_it_edi_related_document/static/description/index.html +441 -0
  14. odoo/addons/l10n_it_edi_related_document/tests/__init__.py +1 -0
  15. odoo/addons/l10n_it_edi_related_document/tests/import_xmls/IT01234567888_FPR01_02.xml +143 -0
  16. odoo/addons/l10n_it_edi_related_document/tests/test_import_xml.py +33 -0
  17. odoo/addons/l10n_it_edi_related_document/views/account_move_related_documents.xml +64 -0
  18. odoo/addons/l10n_it_edi_related_document/views/l10n_it_views.xml +37 -0
  19. odoo/addons/l10n_it_edi_related_document/views/related_document_views.xml +60 -0
  20. odoo_addon_l10n_it_edi_related_document-18.0.1.0.0.3.dist-info/METADATA +111 -0
  21. odoo_addon_l10n_it_edi_related_document-18.0.1.0.0.3.dist-info/RECORD +23 -0
  22. odoo_addon_l10n_it_edi_related_document-18.0.1.0.0.3.dist-info/WHEEL +5 -0
  23. odoo_addon_l10n_it_edi_related_document-18.0.1.0.0.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,441 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: gray; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic, pre.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document">
364
+
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="related-documents-for-edi">
370
+ <h1>Related Documents for EDI</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:9635cb722bff9cdf86aa4c791204157e4ab84e3440f753772ca8a8484b2f5ba8
376
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_edi_related_document"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_edi_related_document"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p><strong>English</strong></p>
379
+ <p>Module for managing the types of documents linked to invoices. The data
380
+ related to the linked documents is then exported in the electronic
381
+ invoice XML or imported during the creation of an invoice from an XML
382
+ file. If a related document has 0 as the line reference, it means that
383
+ it refers to the entire document and not to a specific invoice line.</p>
384
+ <p><strong>Italiano</strong></p>
385
+ <p>Modulo per la gestione dei tipi di documenti collegati alle fatture. I
386
+ dati relativi ai documenti collegati vengono poi esportati nell’XML
387
+ della fattura elettronica oppure importati durante la creazione di una
388
+ fattura da XML. Nel caso in cui un documento collegato abbia 0 come
389
+ riferimento linea, significa che è riferito all’intero documento e non
390
+ ad una specifica linea della fattura.</p>
391
+ <p><strong>Table of contents</strong></p>
392
+ <div class="contents local topic" id="contents">
393
+ <ul class="simple">
394
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
395
+ <li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
396
+ <li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
397
+ <li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
398
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
399
+ </ul>
400
+ </li>
401
+ </ul>
402
+ </div>
403
+ <div class="section" id="bug-tracker">
404
+ <h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
405
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
406
+ In case of trouble, please check there if your issue has already been reported.
407
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
408
+ <a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_edi_related_document%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
409
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
410
+ </div>
411
+ <div class="section" id="credits">
412
+ <h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
413
+ <div class="section" id="authors">
414
+ <h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
415
+ <ul class="simple">
416
+ <li>Nextev Srl</li>
417
+ </ul>
418
+ </div>
419
+ <div class="section" id="contributors">
420
+ <h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
421
+ <ul class="simple">
422
+ <li>Nextev Srl &lt;<a class="reference external" href="mailto:odoo&#64;nextev.it">odoo&#64;nextev.it</a>&gt;</li>
423
+ </ul>
424
+ </div>
425
+ <div class="section" id="maintainers">
426
+ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
427
+ <p>This module is maintained by the OCA.</p>
428
+ <a class="reference external image-reference" href="https://odoo-community.org">
429
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
430
+ </a>
431
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
432
+ mission is to support the collaborative development of Odoo features and
433
+ promote its widespread use.</p>
434
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_edi_related_document">OCA/l10n-italy</a> project on GitHub.</p>
435
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
436
+ </div>
437
+ </div>
438
+ </div>
439
+ </div>
440
+ </body>
441
+ </html>
@@ -0,0 +1 @@
1
+ from . import test_import_xml
@@ -0,0 +1,143 @@
1
+ <p:FatturaElettronica
2
+ versione="FPR12"
3
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
4
+ xmlns:p="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"
5
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
+ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 http://www.fatturapa.gov.it/export/fatturazione/sdi/fatturapa/v1.2/Schema_del_file_xml_FatturaPA_versione_1.2.xsd"
7
+ >
8
+ <FatturaElettronicaHeader>
9
+ <DatiTrasmissione>
10
+ <IdTrasmittente>
11
+ <IdPaese>IT</IdPaese>
12
+ <IdCodice>01234560157</IdCodice>
13
+ </IdTrasmittente>
14
+ <ProgressivoInvio>00001</ProgressivoInvio>
15
+ <FormatoTrasmissione>FPR12</FormatoTrasmissione>
16
+ <CodiceDestinatario>ABC1234</CodiceDestinatario>
17
+ <ContattiTrasmittente />
18
+ </DatiTrasmissione>
19
+ <CedentePrestatore>
20
+ <DatiAnagrafici>
21
+ <IdFiscaleIVA>
22
+ <IdPaese>IT</IdPaese>
23
+ <IdCodice>00313371213</IdCodice>
24
+ </IdFiscaleIVA>
25
+ <CodiceFiscale>93026890017</CodiceFiscale>
26
+ <Anagrafica>
27
+ <Denominazione>SOCIETA' ALPHA SRL</Denominazione>
28
+ </Anagrafica>
29
+ <RegimeFiscale>RF19</RegimeFiscale>
30
+ </DatiAnagrafici>
31
+ <Sede>
32
+ <Indirizzo>VIALE ROMA 543</Indirizzo>
33
+ <CAP>07100</CAP>
34
+ <Comune>SASSARI</Comune>
35
+ <Provincia>SS</Provincia>
36
+ <Nazione>IT</Nazione>
37
+ </Sede>
38
+ </CedentePrestatore>
39
+ <CessionarioCommittente>
40
+ <DatiAnagrafici>
41
+ <CodiceFiscale>01234560157</CodiceFiscale>
42
+ <Anagrafica>
43
+ <Denominazione>DITTA BETA</Denominazione>
44
+ </Anagrafica>
45
+ </DatiAnagrafici>
46
+ <Sede>
47
+ <Indirizzo>VIA TORINO 38-B</Indirizzo>
48
+ <CAP>00145</CAP>
49
+ <Comune>ROMA</Comune>
50
+ <Provincia>RM</Provincia>
51
+ <Nazione>IT</Nazione>
52
+ </Sede>
53
+ </CessionarioCommittente>
54
+ </FatturaElettronicaHeader>
55
+ <FatturaElettronicaBody>
56
+ <DatiGenerali>
57
+ <DatiGeneraliDocumento>
58
+ <TipoDocumento>TD01</TipoDocumento>
59
+ <Divisa>EUR</Divisa>
60
+ <Data>2014-12-18</Data>
61
+ <Numero>01234567888</Numero>
62
+ <Causale
63
+ >LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E
64
+ FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR
65
+ SSSSSSSSSSSSSS
66
+ </Causale>
67
+ <Causale
68
+ >SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA
69
+ BBBBBBBBBBBBBBBBB
70
+ </Causale>
71
+ </DatiGeneraliDocumento>
72
+ <DatiFattureCollegate>
73
+ <IdDocumento>16</IdDocumento>
74
+ <RiferimentoNumeroLinea>1</RiferimentoNumeroLinea>
75
+ <Data>2025-05-22</Data>
76
+ <NumItem>3</NumItem>
77
+ <CodiceCommessaConvenzione>5</CodiceCommessaConvenzione>
78
+ <CodiceCUP>665544</CodiceCUP>
79
+ <CodiceCIG>5554466</CodiceCIG>
80
+ </DatiFattureCollegate>
81
+ <DatiRicezione>
82
+ <RiferimentoNumeroLinea>2</RiferimentoNumeroLinea>
83
+ <IdDocumento>15</IdDocumento>
84
+ <Data>2025-05-21</Data>
85
+ <NumItem>4</NumItem>
86
+ <CodiceCommessaConvenzione>4</CodiceCommessaConvenzione>
87
+ <CodiceCUP>5678</CodiceCUP>
88
+ <CodiceCIG>1234</CodiceCIG>
89
+ </DatiRicezione>
90
+ <DatiTrasporto>
91
+ <DatiAnagraficiVettore>
92
+ <IdFiscaleIVA>
93
+ <IdPaese>IT</IdPaese>
94
+ <IdCodice>24681012141</IdCodice>
95
+ </IdFiscaleIVA>
96
+ <Anagrafica>
97
+ <Denominazione>Trasporto spa</Denominazione>
98
+ </Anagrafica>
99
+ </DatiAnagraficiVettore>
100
+ <DataOraConsegna>2012-10-22T16:46:12.000+02:00</DataOraConsegna>
101
+ </DatiTrasporto>
102
+ </DatiGenerali>
103
+ <DatiBeniServizi>
104
+ <DettaglioLinee>
105
+ <NumeroLinea>1</NumeroLinea>
106
+ <Descrizione>Cool stuff</Descrizione>
107
+ <Quantita>5.00</Quantita>
108
+ <PrezzoUnitario>1.00</PrezzoUnitario>
109
+ <PrezzoTotale>5.00</PrezzoTotale>
110
+ <AliquotaIVA>22.00</AliquotaIVA>
111
+ </DettaglioLinee>
112
+ <DettaglioLinee>
113
+ <NumeroLinea>2</NumeroLinea>
114
+ <Descrizione>OtherAccount</Descrizione>
115
+ <Quantita>3.00</Quantita>
116
+ <PrezzoUnitario>8.00</PrezzoUnitario>
117
+ <PrezzoTotale>24.00</PrezzoTotale>
118
+ <AliquotaIVA>22.00</AliquotaIVA>
119
+ </DettaglioLinee>
120
+ <DettaglioLinee>
121
+ <NumeroLinea>3</NumeroLinea>
122
+ <Descrizione>GuessTaxes</Descrizione>
123
+ <Quantita>1.00</Quantita>
124
+ <PrezzoUnitario>10.00</PrezzoUnitario>
125
+ <PrezzoTotale>10.00</PrezzoTotale>
126
+ </DettaglioLinee>
127
+ <DatiRiepilogo>
128
+ <AliquotaIVA>22.00</AliquotaIVA>
129
+ <ImponibileImporto>29.00</ImponibileImporto>
130
+ <Imposta>6.38</Imposta>
131
+ <EsigibilitaIVA>I</EsigibilitaIVA>
132
+ </DatiRiepilogo>
133
+ </DatiBeniServizi>
134
+ <DatiPagamento>
135
+ <CondizioniPagamento>TP01</CondizioniPagamento>
136
+ <DettaglioPagamento>
137
+ <ModalitaPagamento>MP01</ModalitaPagamento>
138
+ <DataScadenzaPagamento>2015-01-30</DataScadenzaPagamento>
139
+ <ImportoPagamento>36.48</ImportoPagamento>
140
+ </DettaglioPagamento>
141
+ </DatiPagamento>
142
+ </FatturaElettronicaBody>
143
+ </p:FatturaElettronica>
@@ -0,0 +1,33 @@
1
+ from odoo import fields
2
+
3
+ from odoo.addons.l10n_it_edi.tests.common import TestItEdi
4
+
5
+
6
+ class TestItEdiImport(TestItEdi):
7
+ """Main test class for the l10n_it_edi vendor bills XML import"""
8
+
9
+ def test_receive_vendor_bill(self):
10
+ """Test a sample e-invoice file with multiple related documents"""
11
+ self.module = "l10n_it_edi_related_document"
12
+ invoice = self._assert_import_invoice(
13
+ "IT01234567888_FPR01_02.xml",
14
+ [
15
+ {
16
+ "move_type": "in_invoice",
17
+ "invoice_date": fields.Date.from_string("2014-12-18"),
18
+ "amount_untaxed": 39.0,
19
+ "amount_tax": 6.38,
20
+ }
21
+ ],
22
+ )
23
+ related_document = invoice.related_document_ids
24
+ self.assertEqual(len(related_document), 2)
25
+ invoice_doc_type = related_document.filtered(lambda x: x.type == "invoice")[0]
26
+ rcp_doc_type = related_document.filtered(lambda x: x.type == "reception")[0]
27
+ self.assertTrue(invoice_doc_type)
28
+ self.assertTrue(rcp_doc_type)
29
+ self.assertEqual(invoice_doc_type.cig, "5554466")
30
+ self.assertEqual(rcp_doc_type.cup, "5678")
31
+ self.assertTrue(
32
+ invoice.line_ids.filtered(lambda x: rcp_doc_type in x.related_document_ids)
33
+ )
@@ -0,0 +1,64 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <template id="account_invoice_it_dati_documento_correlato">
4
+ <t t-translation="off">
5
+ <RiferimentoNumeroLinea t-if="doc.lineRef" t-out="doc.lineRef" />
6
+ <IdDocumento t-if="doc.name" t-out="doc.name" />
7
+ <Data t-if="doc.date" t-out="doc.date" />
8
+ <NumItem t-if="doc.numitem" t-out="doc.numitem" />
9
+ <CodiceCommessaConvenzione t-if="doc.code" t-out="doc.code" />
10
+ <CodiceCUP t-if="doc.cup" t-out="doc.cup" />
11
+ <CodiceCIG t-if="doc.cig" t-out="doc.cig" />
12
+ </t>
13
+ </template>
14
+
15
+ <template id="account_invoice_it_dati_documenti_correlati">
16
+ <t t-translation="off">
17
+ <t
18
+ t-set="related_orders"
19
+ t-value="record.related_document_ids.filtered(lambda doc: doc.type == 'order')"
20
+ />
21
+ <t
22
+ t-set="related_contracts"
23
+ t-value="record.related_document_ids.filtered(lambda doc: doc.type == 'contract')"
24
+ />
25
+ <t
26
+ t-set="related_agreements"
27
+ t-value="record.related_document_ids.filtered(lambda doc: doc.type == 'agreement')"
28
+ />
29
+ <t
30
+ t-set="related_receptions"
31
+ t-value="record.related_document_ids.filtered(lambda doc: doc.type == 'reception')"
32
+ />
33
+ <t
34
+ t-set="related_invoices"
35
+ t-value="record.related_document_ids.filtered(lambda doc: doc.type == 'invoice')"
36
+ />
37
+ <DatiOrdineAcquisto t-foreach="related_orders" t-as="doc">
38
+ <t
39
+ t-call="l10n_it_edi_related_document.account_invoice_it_dati_documento_correlato"
40
+ />
41
+ </DatiOrdineAcquisto>
42
+ <DatiContratto t-foreach="related_contracts" t-as="doc">
43
+ <t
44
+ t-call="l10n_it_edi_related_document.account_invoice_it_dati_documento_correlato"
45
+ />
46
+ </DatiContratto>
47
+ <DatiConvenzione t-foreach="related_agreements" t-as="doc">
48
+ <t
49
+ t-call="l10n_it_edi_related_document.account_invoice_it_dati_documento_correlato"
50
+ />
51
+ </DatiConvenzione>
52
+ <DatiRicezione t-foreach="related_receptions" t-as="doc">
53
+ <t
54
+ t-call="l10n_it_edi_related_document.account_invoice_it_dati_documento_correlato"
55
+ />
56
+ </DatiRicezione>
57
+ <DatiFattureCollegate t-foreach="related_invoices" t-as="doc">
58
+ <t
59
+ t-call="l10n_it_edi_related_document.account_invoice_it_dati_documento_correlato"
60
+ />
61
+ </DatiFattureCollegate>
62
+ </t>
63
+ </template>
64
+ </odoo>