From cb89ffbedc5abefcf51738455f6cc383d1453588 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 | 16 ++++++++++++---- .../views/account_tax_registry_view.xml | 1 + .../wizard/print_registro_iva.py | 3 +++ .../wizard/print_registro_iva.xml | 1 + 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/l10n_it_vat_registries/models/account_tax_registry.py b/l10n_it_vat_registries/models/account_tax_registry.py index bf861b307e47..9d39a799c6d8 100644 --- a/l10n_it_vat_registries/models/account_tax_registry.py +++ b/l10n_it_vat_registries/models/account_tax_registry.py @@ -32,3 +32,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 34178c8efac0..043fa5f182d0 100644 --- a/l10n_it_vat_registries/models/vat_registry.py +++ b/l10n_it_vat_registries/models/vat_registry.py @@ -37,6 +37,7 @@ def _get_report_values(self, docids, data=None): "l10n_it_count_fiscal_page_base": data["form"]["fiscal_page_base"], "only_totals": data["form"]["only_totals"], "entry_order": data["form"].get("entry_order"), + "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 f4934dc24cde..4cef5e20b658 100644 --- a/l10n_it_vat_registries/report/report_registro_iva.xml +++ b/l10n_it_vat_registries/report/report_registro_iva.xml @@ -155,14 +155,22 @@ /> -
+ +
+ t-esc="partner.name" + /> +
+
diff --git a/l10n_it_vat_registries/views/account_tax_registry_view.xml b/l10n_it_vat_registries/views/account_tax_registry_view.xml index 274f5f515a1a..86d4606bec56 100644 --- a/l10n_it_vat_registries/views/account_tax_registry_view.xml +++ b/l10n_it_vat_registries/views/account_tax_registry_view.xml @@ -10,6 +10,7 @@ + diff --git a/l10n_it_vat_registries/wizard/print_registro_iva.py b/l10n_it_vat_registries/wizard/print_registro_iva.py index 15a3c2395d55..27233a4d24bc 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") entry_order = fields.Selection( [ @@ -49,6 +50,7 @@ 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.entry_order = self.tax_registry_id.entry_order + 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): @@ -110,6 +112,7 @@ def print_registro(self): datas_form["tax_registry_name"] = "" datas_form["only_totals"] = wizard.only_totals datas_form["entry_order"] = wizard.entry_order + 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 b74259bd38fd..2111a17203d6 100644 --- a/l10n_it_vat_registries/wizard/print_registro_iva.xml +++ b/l10n_it_vat_registries/wizard/print_registro_iva.xml @@ -34,6 +34,7 @@ /> +