On 12/04/12 00:42 -0700, user wrote: > Inside the server file trytond/res/user.py there is also a function > set_preferences but allows you to set only the values of: > > self._preferences_fields = [ > 'name', > 'password', > 'email', > 'signature', > 'menu', > 'action', > 'status_bar', > 'warnings', > ] > and > self._context_fields = [ > 'language', > 'language_direction', > 'timezone', > 'groups', > ]
No, the set_context is overided in the company module and add the field
company.
>
> How can I change the current company?
You can use set_preferences to set an other company and call
config.set_{trytond,xmlrpc} to get the new context.
Or if you are using >2.2, you can just update config._context
PS: Please don't top-post and clean previous email as explain in the
netiquette: http://groups.tryton.org/netiquette
--
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/
pgp9BSpA3aNvn.pgp
Description: PGP signature
