diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index d0062c82538..07dcb3965d7 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -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