Skip to content
Snippets Groups Projects
Commit 43065379 authored by alt-odoo's avatar alt-odoo Committed by Jorge Pinna Puissant
Browse files

[FIX] website_sale_digital: access rights error in preview order page

In preview order page, we are looking for product attachments, but if we are
using public user, we get an access rights error leading to a 403 page.

opw-2172563

X-original-commit: d07800eadf49e75c249f9a28aca2412b6b106793
parent d57d27ec
No related branches found
No related tags found
No related merge requests found
......@@ -43,10 +43,10 @@ class WebsiteSaleDigital(CustomerPortal):
# since there is nothing to pay, so we shouldn't wait for an invoice
products = order.order_line.mapped('product_id')
Attachment = request.env['ir.attachment'].sudo()
purchased_products_attachments = {}
for product in products:
# Search for product attachments
Attachment = request.env['ir.attachment']
product_id = product.id
template = product.product_tmpl_id
att = Attachment.sudo().search_read(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment