← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 781247] Re: fields.function does not work in multi mode for different types

 

The fix has been applied on trunk server @3462
vmt@xxxxxxxxxxx-20110615152659-1g2s5vc3outecd71

Thanks,

** Changed in: openobject-server
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/781247

Title:
  fields.function does not work in multi mode for different types

Status in OpenERP Server:
  Fix Released

Bug description:
  When implementing a fields.function with multi='foo', there are many
  cases that will fail, mostly when several fields.function using the
  same 'multi' value have different types.

  The root of the problem lies in osv/fields.py, because function.get()
  does some post-processing of the returned values, but it does not
  properly handle the 'multi' case, where the returned values are dicts,
  and contain a mapping of field names to values.

  The function.get() method should be rewritten to verify if it is a
  'multi' function being called, and perform the post-processing of all
  individual values returned according to the _type of the corresponding
  column (in an efficient manner). This will also take care of the cases
  where 'multi' results would not work at all (like currently for binary
  function fields, apparently).

  If any doubt, do not hesitate to ask me.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/781247/+subscriptions


References