From 238cd085bbdac5f01515a08f99da5e36e0004092 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Thu, 4 Aug 2011 13:00:52 +0530 Subject: [PATCH] [IMP]base_action_rule : Improve the code bzr revid: dbr@tinyerp.com-20110804073052-p9zrcaq9i71jopux --- addons/base_action_rule/base_action_rule.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index cc1f43ce0dc..1319302ee20 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -176,17 +176,15 @@ the rule to mark CC(mail to any other person defined in actions)."), return make_call_old def _write(self, old_write, model, context=None): - if context is None: - context = {} def make_call_old(cr, uid, ids, vals, context=context): if context is None: context = {} if isinstance(ids, (str, int, long)): ids = [ids] - id = old_write(cr, uid, ids, vals, context=context) + change_id = old_write(cr, uid, ids, vals, context=context) if not context.get('action'): self.pre_action(cr, uid, ids, model, context=context) - return id + return change_id return make_call_old def _register_hook(self, cr, uid, ids, context=None):