Reviewers: ,
Please review this at http://codereview.tryton.org/595004/ Affected files: M trytond/model/modelstorage.py Index: trytond/model/modelstorage.py =================================================================== --- a/trytond/model/modelstorage.py +++ b/trytond/model/modelstorage.py @@ -865,6 +865,10 @@ 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) + for record in records: record.pre_validate() @@ -899,10 +903,6 @@ return False with Transaction().set_context(ctx_pref): - # Ensure that records are readable - with Transaction().set_user(0, set_context=True): - records = cls.browse(records) - for field_name, field in cls._fields.iteritems(): if isinstance(field, fields.Function) and \ not field.setter: -- -- [email protected] mailing list
