diff --git a/controllers/main.py b/controllers/main.py index ad854d2d8d1e0591d58382f7bb80c9e588363577..fe3b2571721dacb9e1ecff8f1bec42592290d7aa 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -107,7 +107,7 @@ class AccAccountMain(CustomerPortal): ) else: domain = [("res_model", "=", "acc.account"), ("res_id", "=", invoice_id)] - doc_id = request.env["ir.attachment"].search(domain, limit=1) + doc_id = request.env["ir.attachment"].with_user(SUPERUSER_ID).search(domain, limit=1) if not doc_id: return Response( _("Aucun document n'est disponible à cette URL."), status=404