Skip to content

Commit 46d4749

Browse files
committed
.
1 parent f5dfbd3 commit 46d4749

File tree

2 files changed

+56
-7
lines changed

2 files changed

+56
-7
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"RegistroAlta": {
3+
"IDVersion": 1.0,
4+
"IDFactura": {
5+
"IDEmisorFactura": "G87846952",
6+
"NumSerieFactura": "TEST_EXEMPT_002",
7+
"FechaExpedicionFactura": "01-01-2026"
8+
},
9+
"NombreRazonEmisor": "Spanish test company",
10+
"TipoFactura": "F1",
11+
"DescripcionOperacion": "/",
12+
"Destinatarios": {
13+
"IDDestinatario": {
14+
"NombreRazon": "Test partner",
15+
"NIF": "89890001K"
16+
}
17+
},
18+
"Desglose": {
19+
"DetalleDesglose": [
20+
{
21+
"Impuesto": "01",
22+
"ClaveRegimen": "01",
23+
"BaseImponibleOimporteNoSujeto": 200.0,
24+
"CalificacionOperacion": "N2",
25+
"OperacionExenta": "E3"
26+
}
27+
]
28+
},
29+
"CuotaTotal": 0.0,
30+
"ImporteTotal": 200.0,
31+
"Encadenamiento": {
32+
"PrimerRegistro": "S"
33+
},
34+
"SistemaInformatico": {
35+
"NombreRazon": "Odoo Developer",
36+
"NIF": "A12345674",
37+
"NombreSistemaInformatico": "odoo",
38+
"IdSistemaInformatico": "11",
39+
"Version": "1.0",
40+
"NumeroInstalacion": 1,
41+
"TipoUsoPosibleSoloVerifactu": "S",
42+
"TipoUsoPosibleMultiOT": "S",
43+
"IndicadorMultiplesOT": "N",
44+
"IDOtro": {
45+
"IDType": "",
46+
"ID": ""
47+
}
48+
}
49+
}
50+
}

l10n_es_verifactu_oca/tests/test_10n_es_verifactu.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_verifactu_export_invoice_data(self):
185185
name, inv_type, lines, extra_vals
186186
)
187187

188-
def test_verifactu_export_with_exemption_cause_invoice_data(self):
188+
def test_verifactu_with_exemption_cause_invoice_data(self):
189189
# set exemption cause on fpos and test
190190
self.fp_extra.verifactu_exemption_cause = "E5"
191191
mapping = [
@@ -206,17 +206,16 @@ def test_verifactu_export_with_exemption_cause_invoice_data(self):
206206
)
207207
# set exemption cause on fpos to false
208208
# set exemption cause on product and test again
209-
self.fp_extra.verifactu_exemption_cause = False
210-
self.product.verifactu_exemption_cause = "E5"
209+
self.product.verifactu_exemption_cause = "E3"
211210
# the result should be the same as before
212211
mapping_2 = [
213212
(
214-
"TEST_EXEMPT_001",
213+
"TEST_EXEMPT_002",
215214
"out_invoice",
216-
[(200, ["s_iva_e"])],
215+
[(200, ["s_iva_ns"])],
217216
{
218-
"fiscal_position_id": self.fp_extra.id,
219-
"verifactu_registration_key": self.fp_registration_key_02.id,
217+
"fiscal_position_id": self.fp_nacional.id,
218+
"verifactu_registration_key": self.fp_registration_key_01.id,
220219
"verifactu_registration_date": "2026-01-01 19:20:30",
221220
},
222221
)

0 commit comments

Comments
 (0)