19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:12 +01:00
parent 79f83631d5
commit 73afc09215
6267 changed files with 1534193 additions and 1130106 deletions

View file

@ -8,10 +8,10 @@ from odoo.tools import format_amount
class WebsiteSaleSlides(WebsiteSlides):
@route('/slides/get_course_products', type='json', auth='user')
@route('/slides/get_course_products', type='jsonrpc', auth='user')
def get_course_products(self):
"""Return a list of the course products values with formatted price."""
products = request.env['product.product'].search([('detailed_type', '=', 'course')])
products = request.env['product.product'].search([('service_tracking', '=', 'course')])
return [{
'id': product.id,
@ -25,9 +25,7 @@ class WebsiteSaleSlides(WebsiteSlides):
# search the product to apply ACLs, notably on published status, to avoid access errors
product = request.env['product.product'].search([('id', '=', channel.product_id.id)]) if channel.product_id else request.env['product.product']
if product:
pricelist = request.website.get_current_pricelist()
values['product_info'] = channel.product_id.product_tmpl_id._get_combination_info(product_id=channel.product_id.id, pricelist=pricelist)
values['product_info']['currency_id'] = request.website.currency_id
values['product_info'] = product._get_combination_info_variant()
else:
values['product_info'] = False
return values