diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index ad4710e33825..8ae1d7607301 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -83,6 +83,10 @@ def _compute_e_invoice_validation_error(self):
def get_xml_string(self):
return self.ir_attachment_id.get_xml_string()
+ def recompute_xml_fields(self):
+ self._compute_xml_data()
+ self._compute_registered()
+
@api.depends("ir_attachment_id.datas")
def _compute_xml_data(self):
for att in self:
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 2f1cff695aa8..95f28157b48c 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -31,6 +31,13 @@
text="Show preview"
attrs="{'invisible': [('id', '=', False)]}"
/>
+