mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 22:32:03 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue