[FIX] base: rendering PDF should save ir.attachment
Printing an invoice no longer saved the ir.attachment on the
move.
This is due to the refactor in ffc525419a,
since the render methods are now `api.model`, `self.attachment` was always
Falsy. To get the attachment name of a report, we need to call
`self._get_report(report_ref)`.
closes odoo/odoo#100363
Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
@@ -799,7 +799,7 @@ class IrActionsReport(models.Model):
|
||||
report_sudo = self._get_report(report_ref)
|
||||
|
||||
# Generate the ir.attachment if needed.
|
||||
if self.attachment:
|
||||
if report_sudo.attachment:
|
||||
attachment_vals_list = []
|
||||
for res_id, stream_data in collected_streams.items():
|
||||
# An attachment already exists.
|
||||
|
||||
Reference in New Issue
Block a user