@@ -156,13 +156,13 @@ def _wrap_create(self, old_create, model):
156
156
""" Return a wrapper around `old_create` calling both `old_create` and
157
157
`_process`, in that order.
158
158
"""
159
- def create (cr , uid , vals , context = None ):
159
+ def create (cr , uid , vals , context = None , ** kwargs ):
160
160
# avoid loops or cascading actions
161
161
if context and context .get ('action' ):
162
162
return old_create (cr , uid , vals , context = context )
163
163
164
164
context = dict (context or {}, action = True )
165
- new_id = old_create (cr , uid , vals , context = context )
165
+ new_id = old_create (cr , uid , vals , context = context , ** kwargs )
166
166
167
167
# retrieve the action rules to run on creation
168
168
action_dom = [('model' , '=' , model ), ('kind' , 'in' , ['on_create' , 'on_create_or_write' ])]
@@ -180,10 +180,10 @@ def _wrap_write(self, old_write, model):
180
180
""" Return a wrapper around `old_write` calling both `old_write` and
181
181
`_process`, in that order.
182
182
"""
183
- def write (cr , uid , ids , vals , context = None ):
183
+ def write (cr , uid , ids , vals , context = None , ** kwargs ):
184
184
# avoid loops or cascading actions
185
185
if context and context .get ('action' ):
186
- return old_write (cr , uid , ids , vals , context = context )
186
+ return old_write (cr , uid , ids , vals , context = context , ** kwargs )
187
187
188
188
context = dict (context or {}, action = True )
189
189
ids = [ids ] if isinstance (ids , (int , long , str )) else ids
@@ -199,7 +199,7 @@ def write(cr, uid, ids, vals, context=None):
199
199
pre_ids [action ] = self ._filter (cr , uid , action , action .filter_pre_id , ids , context = context )
200
200
201
201
# execute write
202
- old_write (cr , uid , ids , vals , context = context )
202
+ old_write (cr , uid , ids , vals , context = context , ** kwargs )
203
203
204
204
# check postconditions, and execute actions on the records that satisfy them
205
205
for action in actions :
0 commit comments