openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #03605
Re: start script
It will start the cron jobs if you provide a database with the -d /
--database option which makes openerp load the selected database (and thus
start the cron for that database)
This is a bit problematic if you have multiple databases of which you would
want the cron to automatically after each restart.
Your script would do fine with just the login alone, the search is a bit
redundant as openerp already loads the entire database when trying to
authenticate your login attempt.
Regards,
Niels
2013/10/25 Ferdinand <office@xxxxxxxxxx>
> hello!
>
> starting the openerp server never starts cron jobs etc.
> we suggest to add some code like this to the start script which wakes up
> all these jobs
>
> the user start has no rights, but connecting
> any other sugestion?
>
> **************************
> import xmlrpclib
>
> username = 'start' #the user
> pwd = 'xxxxx' #the password of the user
> dbname = 'yyyyy #the database
>
> # Get the uid
> sock_common = xmlrpclib.ServerProxy ('https://localhost:4443/**
> xmlrpc/common <https://localhost:4443/xmlrpc/common>')
> uid = sock_common.login(dbname, username, pwd)
>
> #replace localhost with the address of the server
> sock = xmlrpclib.ServerProxy('https:/**/localhost:4443/xmlrpc/object<https://localhost:4443/xmlrpc/object>
> '**)
>
> args = [('login', '=', 'admin')] #query clause
> ids = sock.execute(dbname, uid, pwd, 'res.users', 'search', args)
>
> print ids
>
> --
> Ferdinand
>
>
> ______________________________**_________________
> Mailing list: https://launchpad.net/~**openerp-community<https://launchpad.net/~openerp-community>
> Post to : openerp-community@lists.**launchpad.net<openerp-community@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~**openerp-community<https://launchpad.net/~openerp-community>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>
--
Niels Huylebroeck
Lead Architect -- Agaplan
Tel. : +32 (0) 93 95 98 90
Web : http://www.agaplan.eu
Follow ups
References