Files
odoo_source/addons/website_sale_loyalty/models/loyalty_program.py
T
William Braeckman 5cebdc7986 [ADD] website_sale_loyalty: manage loyalty in eCommerce
This module replaces both website_sale_coupon and
website_sale_gift_card.

Connects sale_loyalty with website_sale to allow for promotion programs
in eCommerce.

TaskId-2675382
2022-04-08 11:04:43 +02:00

13 lines
386 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class LoyaltyProgram(models.Model):
_name = 'loyalty.program'
_inherit = ['loyalty.program', 'website.multi.mixin']
def action_program_share(self):
self.ensure_one()
return self.env['coupon.share'].create_share_action(program=self)