From b34343f2b336e3a7143b49cc3b8bc781d4781beb Mon Sep 17 00:00:00 2001 From: eLBati Date: Fri, 16 Feb 2024 16:31:23 +0100 Subject: [PATCH] IMP l10n_it_vat_registries allowing to show full contact address in report --- .../models/account_tax_registry.py | 1 + l10n_it_vat_registries/models/vat_registry.py | 1 + .../report/report_registro_iva.xml | 12 ++++++++++-- .../views/account_tax_registry_view.xml | 1 + l10n_it_vat_registries/wizard/print_registro_iva.py | 3 +++ l10n_it_vat_registries/wizard/print_registro_iva.xml | 1 + 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/l10n_it_vat_registries/models/account_tax_registry.py b/l10n_it_vat_registries/models/account_tax_registry.py index 8c13c5896f45..b431c886a9ae 100644 --- a/l10n_it_vat_registries/models/account_tax_registry.py +++ b/l10n_it_vat_registries/models/account_tax_registry.py @@ -25,3 +25,4 @@ class AccountTaxRegistry(models.Model): "Layout", required=True, ) + show_full_contact_addess = fields.Boolean() diff --git a/l10n_it_vat_registries/models/vat_registry.py b/l10n_it_vat_registries/models/vat_registry.py index d543009c77cf..7550ffc9625b 100644 --- a/l10n_it_vat_registries/models/vat_registry.py +++ b/l10n_it_vat_registries/models/vat_registry.py @@ -36,6 +36,7 @@ def _get_report_values(self, docids, data=None): "compute_totals_tax": self._compute_totals_tax, "l10n_it_count_fiscal_page_base": data["form"]["fiscal_page_base"], "only_totals": data["form"]["only_totals"], + "show_full_contact_addess": data["form"]["show_full_contact_addess"], "date_format": date_format, "year_footer": data["form"]["year_footer"], } diff --git a/l10n_it_vat_registries/report/report_registro_iva.xml b/l10n_it_vat_registries/report/report_registro_iva.xml index 771e502c9ab3..3a5f94976249 100644 --- a/l10n_it_vat_registries/report/report_registro_iva.xml +++ b/l10n_it_vat_registries/report/report_registro_iva.xml @@ -142,10 +142,18 @@ /> -
+
+ /> +
+
+ diff --git a/l10n_it_vat_registries/wizard/print_registro_iva.py b/l10n_it_vat_registries/wizard/print_registro_iva.py index 9f8798af631d..de2e69df1628 100644 --- a/l10n_it_vat_registries/wizard/print_registro_iva.py +++ b/l10n_it_vat_registries/wizard/print_registro_iva.py @@ -21,6 +21,7 @@ class WizardRegistroIva(models.TransientModel): required=True, default="customer", ) + show_full_contact_addess = fields.Boolean() tax_registry_id = fields.Many2one("account.tax.registry", "VAT registry") journal_ids = fields.Many2many( "account.journal", @@ -41,6 +42,7 @@ class WizardRegistroIva(models.TransientModel): def on_change_tax_registry_id(self): self.journal_ids = self.tax_registry_id.journal_ids self.layout_type = self.tax_registry_id.layout_type + self.show_full_contact_addess = self.tax_registry_id.show_full_contact_addess @api.onchange("date_range_id") def on_change_date_range_id(self): @@ -96,6 +98,7 @@ def print_registro(self): else: datas_form["tax_registry_name"] = "" datas_form["only_totals"] = wizard.only_totals + datas_form["show_full_contact_addess"] = wizard.show_full_contact_addess # report_name = 'l10n_it_vat_registries.report_registro_iva' report_name = "l10n_it_vat_registries.action_report_registro_iva" datas = {"ids": move_ids, "model": "account.move", "form": datas_form} diff --git a/l10n_it_vat_registries/wizard/print_registro_iva.xml b/l10n_it_vat_registries/wizard/print_registro_iva.xml index f5088a923827..9235f8e2fb1b 100644 --- a/l10n_it_vat_registries/wizard/print_registro_iva.xml +++ b/l10n_it_vat_registries/wizard/print_registro_iva.xml @@ -33,6 +33,7 @@ /> +