[FIX] fix exception check
authorAlexandre Fayolle <alexandre.fayolle@camptocamp.com>
Thu, 23 May 2013 09:00:55 +0000 (11:00 +0200)
committerAlexandre Fayolle <alexandre.fayolle@camptocamp.com>
Thu, 23 May 2013 09:00:55 +0000 (11:00 +0200)
bzr revid: alexandre.fayolle@camptocamp.com-20130523090055-4m418aninaczbzcy

addons/stock/wizard/stock_fill_inventory.py

index d0062c8..07dcb39 100644 (file)
@@ -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