mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 20:52:07 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.http import request
|
||||
from odoo.addons.website_sale.controllers.main import WebsiteSale
|
||||
|
||||
|
||||
class WebsiteSaleSlides(WebsiteSale):
|
||||
|
||||
def _prepare_shop_payment_confirmation_values(self, order):
|
||||
values = super()._prepare_shop_payment_confirmation_values(order)
|
||||
if order.order_line.product_id.channel_ids:
|
||||
channel_partners = request.env['slide.channel.partner'].sudo().search([
|
||||
('partner_id', '=', order.partner_id.id),
|
||||
('channel_id', 'in', order.order_line.product_id.channel_ids.ids),
|
||||
])
|
||||
values['course_memberships'] = {
|
||||
channel_partner.channel_id: channel_partner
|
||||
for channel_partner in channel_partners
|
||||
}
|
||||
return values
|
||||
Loading…
Add table
Add a link
Reference in a new issue