Reviewers: ,
Please review this at http://codereview.tryton.org/662002/
Affected files:
M trytond/model/fields/function.py
Index: trytond/model/fields/function.py
===================================================================
--- a/trytond/model/fields/function.py
+++ b/trytond/model/fields/function.py
@@ -81,7 +81,14 @@
if not hasattr(method, 'im_self') or method.im_self:
return method(records, name)
else:
- return dict((r.id, method(r, name)) for r in records)
+ if isinstance(name, list):
+ res = {}.fromkeys(name, {})
+ for r in records:
+ for name, value in method(r, name).iteritems():
+ res[name][r.id] = value
+ return res
+ else:
+ return dict((r.id, method(r, name)) for r in records)
if isinstance(name, list):
names = name
# Test is the function works with a list of names
--
--
[email protected] mailing list
---
You received this message because you are subscribed to the Google Groups "tryton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.