[FIX] website_sale_digital: no link to download
In the portal, there is no link to the downloadable content.
This is because the content of the `super` call has been changed in
4c31a758cf. The key is now `sale_order`.
opw-1895878
closes odoo/odoo#28132
This commit is contained in:
@@ -31,9 +31,9 @@ class WebsiteSaleDigital(CustomerPortal):
|
||||
], type='http', auth='public', website=True)
|
||||
def portal_order_page(self, order_id=None, **post):
|
||||
response = super(WebsiteSaleDigital, self).portal_order_page(order_id=order_id, **post)
|
||||
if not 'order' in response.qcontext:
|
||||
if not 'sale_order' in response.qcontext:
|
||||
return response
|
||||
order = response.qcontext['order']
|
||||
order = response.qcontext['sale_order']
|
||||
invoiced_lines = request.env['account.invoice.line'].sudo().search([('invoice_id', 'in', order.invoice_ids.ids), ('invoice_id.state', '=', 'paid')])
|
||||
products = invoiced_lines.mapped('product_id') | order.order_line.filtered(lambda r: not r.price_subtotal).mapped('product_id')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user