c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #01967
[Bug 666781] Re: useless list comprehension and browse in split_moves
I agree, this code should be reviewed.
Thanks,
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Importance: Undecided => Low
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 2 (openerp-dev-addons2)
--
useless list comprehension and browse in split_moves
https://bugs.launchpad.net/bugs/666781
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Addons Modules: Confirmed
Bug description:
Nothing important, but stock/stock_split_move.py has a portion that read like this:
move_ids = [m.id for m in [line for line in pick.move_lines]]
for move in move_obj.browse(cr, uid, move_ids, context=context):
I think [line for line in X] just makes a copy of X. Then we do it just to get ids and browse again.
So I suppose it should just read:
for move in move_lines:
Lionel
References