mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
16 lines
498 B
Python
16 lines
498 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
import logging
|
|
from odoo import api, fields, models, modules, tools, _
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
class IrCron(models.Model):
|
|
_inherit = "ir.cron"
|
|
|
|
trigger_user_id = fields.Many2one('res.users', string='Last Trigger User')
|
|
|
|
def method_direct_trigger(self):
|
|
self.write({'trigger_user_id': self.env.user.id})
|
|
return super(IrCron, self).method_direct_trigger()
|