[FIX] report_qweb_encrypt: the case without res_ids
parent
416bf02bcd
commit
12616ac1bd
|
@ -34,10 +34,11 @@ class IrActionsReport(models.Model):
|
||||||
document, ttype = super(IrActionsReport, self)._render_qweb_pdf(
|
document, ttype = super(IrActionsReport, self)._render_qweb_pdf(
|
||||||
res_ids=res_ids, data=data
|
res_ids=res_ids, data=data
|
||||||
)
|
)
|
||||||
if isinstance(res_ids, int):
|
if res_ids:
|
||||||
res_ids = [res_ids]
|
if isinstance(res_ids, int):
|
||||||
password = self._get_pdf_password(res_ids[:1])
|
res_ids = [res_ids]
|
||||||
document = self._encrypt_pdf(document, password)
|
password = self._get_pdf_password(res_ids[:1])
|
||||||
|
document = self._encrypt_pdf(document, password)
|
||||||
return document, ttype
|
return document, ttype
|
||||||
|
|
||||||
def _get_pdf_password(self, res_id):
|
def _get_pdf_password(self, res_id):
|
||||||
|
|
Loading…
Reference in New Issue