useless list comprehension and browse in split_moves

Bug #666781 reported by Numérigraphe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 2
Nominated for Trunk by Numérigraphe

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

Related branches

summary: - useless list comprehension
+ useless list comprehension and browse in split_moves
description: updated
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I agree, this code should be reviewed.
Thanks,

Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Hello Lionel,
Thanks for your suggestions,
its improved in lp:~openerp-dev/openobject-addons/rpa-dev-addons2 by:
revision-id: <email address hidden>
revision-no: 4501
will be available in trunk soon...

Changed in openobject-addons:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.