[IMP] partner_statement: Translate statement title

This commit is contained in:
Simone Rubino
2025-07-03 16:25:57 +02:00
committed by Miquel Raïch
parent 736e816bae
commit a792d29e16
11 changed files with 134 additions and 55 deletions

View File

@@ -4,9 +4,7 @@
from odoo import _, models
from odoo.addons.report_xlsx_helper.report.report_xlsx_format import ( # type: ignore
FORMATS,
)
from odoo.addons.report_xlsx_helper.report.report_xlsx_format import FORMATS
def copy_format(book, fmt):
@@ -158,12 +156,12 @@ class OutstandingStatementXslx(models.AbstractModel):
currency_data = partner_data.get("currencies", {}).get(currency.id)
account_type = data.get("account_type", False)
row_pos += 2
statement_header = _("%(payable)sStatement up to %(end)s in %(currency)s") % {
"payable": account_type == "liability_payable" and _("Supplier ") or "",
"end": partner_data.get("end"),
"currency": currency.display_name,
}
statement_header = data["get_title"](
partner,
account_type=account_type,
ending_date=partner_data.get("end"),
currency=currency.display_name,
)
sheet.merge_range(
row_pos, 0, row_pos, 6, statement_header, FORMATS["format_left_bold"]
)