[FIX] stock: mute orm logger before checking access rules
bzr revid: chs@openerp.com-20131108230224-tqj0tg5xgz8ramwd
This commit is contained in:
parent
4166baa1ba
commit
9a1c54d242
|
@ -21,6 +21,7 @@
|
|||
|
||||
from openerp.osv import fields, osv, orm
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools import mute_logger
|
||||
|
||||
class stock_fill_inventory(osv.osv_memory):
|
||||
_name = "stock.fill.inventory"
|
||||
|
@ -29,7 +30,8 @@ class stock_fill_inventory(osv.osv_memory):
|
|||
def _default_location(self, cr, uid, ids, context=None):
|
||||
try:
|
||||
location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
|
||||
location.check_access_rule('read', context=context)
|
||||
with mute_logger('openerp.osv.orm'):
|
||||
location.check_access_rule('read', context=context)
|
||||
location_id = location.id
|
||||
except (ValueError, orm.except_orm), e:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue