[FIX] stock: proper context passing

bzr revid: odo@openerp.com-20110919112837-qhdt3cj41qvrf6e6
This commit is contained in:
Olivier Dony
2011-09-19 13:28:37 +02:00
parent 5e6e78112c
commit 6bdf7719fe
+1 -1
View File
@@ -1560,7 +1560,7 @@ class stock_move(osv.osv):
'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True),
}
def _check_location(self, cr, uid, ids, context=None):
for record in self.browse(cr, uid, ids, context=context or {}):
for record in self.browse(cr, uid, ids, context=context):
if (record.state=='done') and (record.location_dest_id.usage == 'view' or record.location_id.usage == 'view'):
return False
return True