No need to change user to validate

Validation of record should not depend on the user.

review948002
This commit is contained in:
Cédric Krier committed 2013-07-04 19:28:27 +02:00
1 parent 5205d597ee
commit 6c97a9ea7e
1 file changed
-5
-5
View File
@@ -879,11 +879,6 @@ class ModelStorage(Model):
@classmethod
def _validate(cls, records):
pool = Pool()
if (Transaction().user == 0
and Transaction().context.get('user')):
with Transaction().set_user(Transaction().context.get('user')):
return cls._validate(cls.browse(records))
# Ensure that records are readable
with Transaction().set_user(0, set_context=True):
records = cls.browse(records)