[FIX] report_qweb_signer: Handle multi-company correctly

This commit is contained in:
Omar (Comunitea)
2022-02-18 18:47:46 +01:00
parent fde3c75b21
commit 849d8f1b9e

View File

@@ -38,7 +38,7 @@ class IrActionsReport(models.Model):
"""Obtain the proper certificate for the report and the conditions."""
if self.report_type != "qweb-pdf":
return False
company_id = self.env.user.company_id.id
company_id = self.env.company.id
if res_ids:
obj = self.env[self.model].browse(res_ids[0])
if "company_id" in obj: