[FIX] fnct_inv in client actions params, fix docstring for fnct_inv (fnct_inv only takes a single record id, not a sequence of ids)
bzr revid: xmo@openerp.com-20110825123049-bmvebm86gqgr6w43
This commit is contained in:
parent
259892f837
commit
b5a429d008
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue