[FIX] stock.partial.picking: more robust fields_view_get() if no active_ids in context (via xrg)
bzr revid: odo@openerp.com-20110117150832-2k90u8xk12xiokgb
This commit is contained in:
@@ -83,6 +83,10 @@ class stock_partial_picking(osv.osv_memory):
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
picking_ids = context.get('active_ids', False)
|
||||
|
||||
if not picking_ids:
|
||||
# not called through an action (e.g. buildbot), return the default.
|
||||
return result
|
||||
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids, context=context):
|
||||
picking_type = self.get_picking_type(cr, uid, pick, context=context)
|
||||
|
||||
@@ -168,4 +172,4 @@ class stock_partial_picking(osv.osv_memory):
|
||||
|
||||
stock_partial_picking()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user