[FIX] base_action_rule: pass kwargs when calling create/write's origin method

This commit is contained in:
FalcoBolger 2015-12-07 10:36:25 +01:00 committed by Raphael Collet
parent 85e33c8e1d
commit 4ba2e91aa4
1 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ class base_action_rule(osv.osv):
def create(self, cr, uid, vals, context=None, **kwargs):
# avoid loops or cascading actions
if context and context.get('action'):
return create.origin(self, cr, uid, vals, context=context)
return create.origin(self, cr, uid, vals, context=context, **kwargs)
# call original method with a modified context
context = dict(context or {}, action=True)
@ -206,7 +206,7 @@ class base_action_rule(osv.osv):
def write(self, cr, uid, ids, vals, context=None, **kwargs):
# avoid loops or cascading actions
if context and context.get('action'):
return write.origin(self, cr, uid, ids, vals, context=context)
return write.origin(self, cr, uid, ids, vals, context=context, **kwargs)
# modify context
context = dict(context or {}, action=True)