Odoo modules related to events management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
998 B

from odoo import models, api
class EventEventTicket(models.Model):
_inherit = "event.event.ticket"
@api.depends("product_id")
def _compute_description(self):
for ticket in self:
product = ticket.product_id
description_sale = (
product and product.get_product_multiline_description_sale() or False
)
if product and description_sale:
ticket.description = description_sale
if not ticket.description:
ticket.description = False
def _get_ticket_multiline_description(self):
self.ensure_one()
product = self.product_id
description_sale = (
product and product.get_product_multiline_description_sale() or False
)
if description_sale:
return "%s\n%s" % (
description_sale,
self.event_id.display_name,
)
return super()._get_ticket_multiline_description()