Code review comment for lp:~camptocamp/ocb-addons/7.0-fix-lp-1204832old-RDE

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

if old_ptype == 'internal' :
17 + model_name = 'stock.picking'
18 + else :
19 + model_name = 'stock.picking.' + old_ptype

Should be optimized:

model_name = 'stock.picking' + ( old_ptype != 'internal' and ('.' + old_ptype) or '')

AND
if pick_name will always be True, so should not be needed.
Instead this should be inline:

new_pick_name = picking.type == 'out' and seq_obj.get(cr, uid, 'stock.picking.' + ptype) or pick_name

Hope this helps.

(else and : should be together..pep8)

Thanks.

review: Needs Fixing

« Back to merge proposal