← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 666781] Re: useless list comprehension and browse in split_moves

 

** Branch linked: lp:~openerp-dev/openobject-addons/rpa-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: In Progress

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