Purpose ======= This commit adds a default product called "Access Course" to the database when you have the `website_sale_slides` installed. This commit also starts the transition for courses products into `event ticket`-like products Specifications ============== This product is already created in order to help the users start to sell their courses. We also added a new type of product named `Courses`. This will be used to create courses and easily work with courses products. The commit adds the list of all the courses that the will gain access to when he will buy the product inside of the cart and in the right column whe it appears. It also adds the same list when the product is inserted into a sales order. The commit adds the choice of enroll policies in the front-end when `website_sales_slides` is installed and of the corresponding product if we are creating a paid course. Task-2636092 closes odoo/odoo#77990 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
16 lines
396 B
Python
16 lines
396 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
from odoo.osv import expression
|
|
|
|
|
|
class Website(models.Model):
|
|
_inherit = 'website'
|
|
|
|
def sale_product_domain(self):
|
|
return expression.AND([
|
|
super(Website, self).sale_product_domain(),
|
|
[('detailed_type', '!=', 'course')],
|
|
])
|