Use _check_access instead of set_user

This commit is contained in:
Guillem Barba 2015-07-23 11:26:42 +02:00
parent 5dfe663ce1
commit 7dc1b1a192

View file

@ -17,7 +17,7 @@ def process_opportunity(func):
pool = Pool()
Opportunity = pool.get('sale.opportunity')
func(cls, sales)
with Transaction().set_user(0, set_context=True):
with Transaction().set_context(_check_access=False):
Opportunity.process([o for s in cls.browse(sales)
for o in s.opportunities])
return wrapper