From e3ab323e299c3f85486b3e3f06f40786e3423c17 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 3 Aug 2016 12:39:20 +0200 Subject: [PATCH] [FIX] base: add method allowing to call ir.server.action from crons --- openerp/addons/base/ir/ir_actions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openerp/addons/base/ir/ir_actions.py b/openerp/addons/base/ir/ir_actions.py index ff3d0fbde45..c08d24c8801 100644 --- a/openerp/addons/base/ir/ir_actions.py +++ b/openerp/addons/base/ir/ir_actions.py @@ -978,6 +978,14 @@ class IrActionsServer(models.Model): res = func(action, eval_context=eval_context) return res + @api.model + def _run_actions(self, ids): + """ + Run server actions with given ids. + Allow crons to run specific server actions + """ + return self.browse(ids).run() + class IrServerObjectLines(models.Model): _name = 'ir.server.object.lines'