On 04/09/12 16:10 +0200, Raimon Esteve wrote: > 2012/9/4 Cédric Krier <[email protected]>: > >> 2- In cron, execution user run is inactive (for example, > >> user_cron_trigger), and the result is: this user don't have acces > >> rule: "You try to bypass an access rule" (you get this message in > >> request user). > > > > Which access rule? > > https://bitbucket.org/zikzakmedia/trytond-electronic_mail/src/11be16c32885/electronic_mail.py#cl-83 > or > https://github.com/openlabs/electronic-mail/blob/master/electronic_mail.py#L82 > > But if we add SQL to change active = True in cron trigger user, don't > get error acces rule.
I think the call to search_domain in Rule.domain_get [1] should be done
with the context {'active_test': False}
[1]
http://hg.tryton.org/trytond/file/702e3f939652/trytond/ir/rule.py#l250
--
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/
pgp0bSUEOSLd6.pgp
Description: PGP signature
