mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
int app-odoo 17, paid
This commit is contained in:
15
app_common/models/ir_cron.py
Normal file
15
app_common/models/ir_cron.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- 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()
|
||||
Reference in New Issue
Block a user