mirror of
https://github.com/odoo/runbot.git
synced 2025-03-18 00:45:49 +07:00
14 lines
410 B
Python
14 lines
410 B
Python
import odoo
|
|
from dateutil.relativedelta import relativedelta
|
|
|
|
from odoo import models, fields
|
|
|
|
odoo.service.server.SLEEP_INTERVAL = 5
|
|
odoo.addons.base.models.ir_cron._intervalTypes['seconds'] = lambda interval: relativedelta(seconds=interval)
|
|
|
|
|
|
class ir_cron(models.Model):
|
|
_inherit = "ir.cron"
|
|
|
|
interval_type = fields.Selection(selection_add=[('seconds', 'Seconds')], ondelete={'seconds': 'cascade'})
|