summaryrefslogtreecommitdiff
path: root/addons/test_timer/models/timer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/test_timer/models/timer_test.py')
-rw-r--r--addons/test_timer/models/timer_test.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/test_timer/models/timer_test.py b/addons/test_timer/models/timer_test.py
new file mode 100644
index 00000000000..5eb26b7618d
--- /dev/null
+++ b/addons/test_timer/models/timer_test.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import fields, models
+
+
+class TimerTest(models.Model):
+ """ A very simple model only inheriting from timer.mixin to test
+ timer features """
+ _description = 'Timer Model'
+ _name = 'timer.test'
+ _inherit = ['timer.mixin']
+
+ name = fields.Char(required=1)
+
+
+class OverrideInterruptionTimerTest(models.Model):
+ """ A very simple model inheriting from timer.mixin and
+ overriding _action_interrupt_user_timers() """
+ _description = 'Interruption Timer Model'
+ _name = 'interruption.timer.test'
+ _inherit = ['timer.mixin']
+
+ def _action_interrupt_user_timers(self):
+ self.action_timer_stop()