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.
|
|
from odoo import models, fields, api
class EventEvent(models.Model): _inherit = "event.event"
website_indexed = fields.Boolean( string="Indexed in website", default=True, help="This event cannot be found by website suearch if unindexed.", )
@api.model def _search_build_domain(self, domain_list, search, fields, extra=None): if isinstance(domain_list, (list, tuple)): if not any( any(term[0] == "website_indexed" for term in domain) for domain in domain_list ): domain_list.append([("website_indexed", "=", True)]) else: domain_list = [[("website_indexed", "=", True)]] return super()._search_build_domain(domain_list, search, fields, extra)
|