On 25/06/13 13:33 +0000, [email protected] wrote:
> Reviewers: ,
> 
> Description:
> trytond: No need to change user to validate
> 
> Please review this at http://codereview.tryton.org/948002/
> 
> Affected files:
>   M trytond/model/modelstorage.py
> 
> 
> Index: trytond/model/modelstorage.py
> ===================================================================
> --- a/trytond/model/modelstorage.py
> +++ b/trytond/model/modelstorage.py
> @@ -879,11 +879,6 @@
>      @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)
> 
> 


I really would like if someone rely on this behavior of the validation
method.
For me, validation should never depend on the user but maybe I miss a
case?

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgp6Vi_9UsocO.pgp
Description: PGP signature

Reply via email to