Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] IMP l10n_it_vat_registries allowing to show full contact address in report #3972

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions l10n_it_vat_registries/models/account_tax_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ class AccountTaxRegistry(models.Model):
"Layout",
required=True,
)
show_full_contact_addess = fields.Boolean()
1 change: 1 addition & 0 deletions l10n_it_vat_registries/models/vat_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
}
Expand Down
19 changes: 15 additions & 4 deletions l10n_it_vat_registries/report/report_registro_iva.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,25 @@
/></td>
</t>
<!-- Ragione sociale -->
<td class="left_without_line_bold"><div
<td class="left_without_line_bold">
<t
t-set="partner"
t-value="move.partner_id"
/>
<div
style="page-break-inside: avoid"
t-esc="move.partner_id.name"
/></td>
t-esc="partner.name"
/>
<div
t-if="show_full_contact_addess"
style="page-break-inside: avoid"
t-esc="partner._display_address(without_company=True)"
/>
</td>
<!-- PIVA -->
<td class="left_without_line_bold"><div
style="page-break-inside: avoid"
t-esc="move.partner_id.vat"
t-esc="partner.vat"
/></td>
</t>
<td class="left_without_line" />
Expand Down
1 change: 1 addition & 0 deletions l10n_it_vat_registries/views/account_tax_registry_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<field name="name" />
<field name="layout_type" />
<field name="entry_order" />
<field name="show_full_contact_addess" />
</group>
<separator string="Journals" />
<field name="journal_ids" />
Expand Down
3 changes: 3 additions & 0 deletions l10n_it_vat_registries/wizard/print_registro_iva.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions l10n_it_vat_registries/wizard/print_registro_iva.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/>
<group string="Layout">
<field name="layout_type" />
<field name="show_full_contact_addess" />
<field name="only_totals" />
<field name="fiscal_page_base" />
</group>
Expand Down
Loading