[FIX] report_qweb_signer: Handle multi-company correctly

This commit is contained in:
Omar (Comunitea)
2022-02-18 18:47:46 +01:00
committed by Benjamin Willig
parent 2287f7d4a1
commit 8de7f8b2f3

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: