mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 10:19:09 +02:00
16 lines
414 B
Python
16 lines
414 B
Python
# See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
class CalendarEvent(models.Model):
|
|
|
|
_inherit = 'calendar.event'
|
|
|
|
@api.model
|
|
def inactive_rule(self):
|
|
rule_rec = self.env.ref('calendar.calendar_event_rule_employee',
|
|
raise_if_not_found=False)
|
|
if rule_rec and rule_rec.active:
|
|
rule_rec.active = False
|