mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-18 10:49:11 +02:00
add gym module
This commit is contained in:
15
gym/models/calendar_event.py
Normal file
15
gym/models/calendar_event.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user