On 08 May 20:01, Sergi Almacellas Abellana wrote: > > > On 8 de maig de 2014 19:46:09 CEST, Ivan Rodrigues <[email protected]> wrote: > >Hello, > >I'm trying to get the logged user to fill a field. > > > >@staticmethod > >def default_user(): > > return ??? > > > >I tried to return Eval('context', {}).get('user', 0) but it doesn't > >work. > > Transaction().context.get('user')
Indeed Transaction().user should be better http://doc.tryton.org/3.2/trytond/doc/ref/transaction.html?highlight=transaction#trytond.transaction.Transaction.user -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgpFZ0SyTFI5I.pgp
Description: PGP signature
