2014-02-02 14:38:40 |
Lionel Sausin - Initiatives/Numérigraphe |
description |
I noticed something weird in the code of Account Budget Lines.
It seems like no-op proxy functions have been introduced in this revision ages ago : revid:jvo@tinyerp.com-20080925130210-bmi3uuq26zit9ke3
Here is the first (the other read mostly the same):
def _prac(self, cr, uid, ids, name, args, context=None):
res={}
for line in self.browse(cr, uid, ids, context=context):
res[line.id] = self._prac_amt(cr, uid, [line.id], context=context)[line.id]
return res
Am I missing something, is this just return exact same value as _prac_amt in a totally inefficient way? Using browse() to get the ids is strange. And it's just rebuilding a dictionary it already has isn't it? |
I noticed something weird in the code of Account Budget Lines.
It seems like no-op proxy functions have been introduced in this revision ages ago : revid:jvo@tinyerp.com-20080925130210-bmi3uuq26zit9ke3
Here is the first (the other read mostly the same):
def _prac(self, cr, uid, ids, name, args, context=None):
res={}
for line in self.browse(cr, uid, ids, context=context):
res[line.id] = self._prac_amt(cr, uid, [line.id], context=context)[line.id]
return res
Am I missing something, or is this just returning the exact same value as _prac_amt in a totally inefficient way?
Using browse() to get the ids is strange. And it's just rebuilding a dictionary it already has isn't it? |
|