Files
tra_backend/gym/models/calendar_event.py
2020-08-04 16:50:06 +05:30

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