c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #24905
[Bug 781247] Re: fields.function does not work in multi mode for different types
Hello,
It has been fixed in lp:~openerp-dev/openobject-server/trunk-bug-781247-ysa
Revision no :- 3421
Revision ID: ysa@xxxxxxxxxxx-20110523090113-tryh2f1c760sf8er and It will be merged soon
to the trunk server.
Thanks,
** Branch linked: lp:~openerp-dev/openobject-server/trunk-bug-781247-ysa
** Changed in: openobject-server
Status: In Progress => Fix Committed
--
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 Committed
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