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.
« Back to merge proposal
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.