odoo/odoo#264841

Created by Eve Lin (evlin)
Merged at 24c3a118fd40e4ca9a72b115372d8c1c5cf4db6e

Statuses:

label
odoo-dev:19.0-opw-6207518-evlin
head
fb9fe32df9326084566c1cfc104c7904db8ed6f2
merged
3 days ago by Accounting, Sven Führ (svfu)
odoo/odoo
19.0 #264841
saas-19.1 #265585
saas-19.2 #265626
saas-19.3 #265658
master #265683

[FIX] account: distinct fallback names for dynamic reports

Problem:
When adding additional dynamic reports to the “Invoice: Send by Email” template, reports without a configured print_report_name incorrectly use the invoice filename. This is an issue because multiple attachments can have the same exact filename.

Example from related ticket: the user attached timesheets to their template and both the invoice PDF and timesheet attachment used the same filename.

Expected:
The additional report should use its own fallback filename (ex: timesheets_INV_XXX.pdf) or its configured
print_report_name.

Actual:
The additional report uses the invoice filename instead.

To fix this, reports without print_report_name now fallback to: <report name>_<invoice name>.pdf as done in v18.0

Related Ticket: 6207518 and 6175376