← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

** Changed in: openobject-server
       Status: Confirmed => In Progress

-- 
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:
  In Progress

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.


References