diff --git a/openerp/addons/base/ir/ir_actions.py b/openerp/addons/base/ir/ir_actions.py index 0b60d389287..67c36b277dd 100644 --- a/openerp/addons/base/ir/ir_actions.py +++ b/openerp/addons/base/ir/ir_actions.py @@ -936,10 +936,9 @@ class act_client(osv.osv): for record in self.browse(cr, uid, ids, context=context) ]) - def _set_params(self, cr, uid, ids, field_name, field_value, arg, context): + def _set_params(self, cr, uid, id, field_name, field_value, arg, context): assert isinstance(field_value, dict), "params can only be dictionaries" - for record in self.browse(cr, uid, ids, context=context): - record.write({field_name: repr(field_value)}) + self.write(cr, uid, id, {'params_store': repr(field_value)}, context=context) _columns = { 'tag': fields.char('Client action tag', size=64, required=True, diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 782cc8e796a..fb973d2e521 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -852,12 +852,13 @@ class function(_column): This callable implements the write operation for the function field and must have the following signature: - .. function:: fnct_inv(model, cr, uid, ids, field_name, field_value, fnct_inv_arg, context) + .. function:: fnct_inv(model, cr, uid, id, field_name, field_value, fnct_inv_arg, context) Callable that implements the ``write`` operation for the function field. :param orm_template model: model to which the field belongs (should be ``self`` for a model method) + :param int id: the identifier of the object to write on :param str field_name: name of the field to set :param fnct_inv_arg: arbitrary value passed when declaring the function field :return: True