diff --git a/addons/l10n_it_edi/data/invoice_it_template.xml b/addons/l10n_it_edi/data/invoice_it_template.xml
index 11257cd3dce..3ec25dc45f5 100644
--- a/addons/l10n_it_edi/data/invoice_it_template.xml
+++ b/addons/l10n_it_edi/data/invoice_it_template.xml
@@ -132,7 +132,7 @@
SI
-
+
diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py
index b3ba9de9fe8..94493f03639 100644
--- a/addons/l10n_it_edi/models/account_invoice.py
+++ b/addons/l10n_it_edi/models/account_invoice.py
@@ -178,6 +178,12 @@ class AccountMove(models.Model):
or (partner.country_id.code == 'IT' and '0000000')
or 'XXXXXXX')
+ # Self-invoices are technically -100%/+100% repartitioned
+ # but functionally need to be exported as 100%
+ document_total = self.amount_total
+ if is_self_invoice:
+ document_total += sum([v['tax_amount_currency'] for k, v in tax_details['tax_details'].items()])
+
# Create file content.
template_values = {
'record': self,
@@ -191,6 +197,7 @@ class AccountMove(models.Model):
'seller': seller,
'seller_partner': company.partner_id if not is_self_invoice else partner,
'currency': self.currency_id or self.company_currency_id,
+ 'document_total': document_total,
'representative': company.l10n_it_tax_representative_partner_id,
'codice_destinatario': codice_destinatario,
'regime_fiscale': company.l10n_it_tax_system if not is_self_invoice else 'RF01',
diff --git a/addons/l10n_it_edi_sdicoop/tests/expected_xmls/reverse_charge_bill.xml b/addons/l10n_it_edi_sdicoop/tests/expected_xmls/reverse_charge_bill.xml
index 44f5177021c..9b5fc4e1c28 100644
--- a/addons/l10n_it_edi_sdicoop/tests/expected_xmls/reverse_charge_bill.xml
+++ b/addons/l10n_it_edi_sdicoop/tests/expected_xmls/reverse_charge_bill.xml
@@ -54,7 +54,7 @@
EUR
2022-03-24
BILL/2022/03/0001
- 1600.80
+ 1808.91