[FIX] fix exception check
bzr revid: alexandre.fayolle@camptocamp.com-20130523090055-4m418aninaczbzcy
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.osv import fields, osv, orm
|
||||
from openerp.tools.translate import _
|
||||
|
||||
class stock_fill_inventory(osv.osv_memory):
|
||||
@@ -31,7 +31,7 @@ class stock_fill_inventory(osv.osv_memory):
|
||||
location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
|
||||
location.check_access_rule('read', context=context)
|
||||
location_id = location.id
|
||||
except ValueError, e:
|
||||
except (ValueError, orm.except_orm), e:
|
||||
return False
|
||||
return location_id or False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user