Alchemist777
Alchemist777

Reputation: 1681

Ubuntu command to restart OpenERP6.1 server after modifying a particular module

I am working with OpenERP6.1. Does anyone know how to restart OpenERP6.1 server after modifying a particular module, to see the effect of changes made to that particular module? I can get the changes reflected by upgrading the module, but that takes a bit too much time.

With OpenERP6.0 we give the command:

/some-path/openerp-server.py --addons=../addons/ -u 'module name' -d 'database'

I need the corresponding one for OpenERP6.1

Upvotes: 0

Views: 2740

Answers (2)

Alchemist777
Alchemist777

Reputation: 1681

The following command did the job for me..

sudo /etc/init.d/openerp restart

Upvotes: 1

Don Kirkby
Don Kirkby

Reputation: 56660

You're only asking about changes to the database and views, right? If the module's code has changed, then the command you gave won't work. You have to restart the OpenERP server process to get new code to run.

Are you sure that your command ran any faster than upgrading the module? I can't understand how it would.

In either case, it looks like the command should still work in 6.1. The configuration code still seems to support the -u option.

# Server startup config
group = optparse.OptionGroup(parser, "Common options")
group.add_option("-c", "--config", dest="config", help="specify alternate config file")
group.add_option("-s", "--save", action="store_true", dest="save", default=False,
                  help="save configuration to ~/.openerp_serverrc")
group.add_option("-i", "--init", dest="init", help="install one or more modules (comma-separated list, use \"all\" for all modules), requires -d")
group.add_option("-u", "--update", dest="update",
                  help="update one or more modules (comma-separated list, use \"all\" for all modules). Requires -d.")

The -d option also seems supported.

group = optparse.OptionGroup(parser, "Database related options")
group.add_option("-d", "--database", dest="db_name", my_default=False,
                 help="specify the database name")

What happens when you try to run the command you gave? It's possible that caching behaviour has changed in 6.1, so it doesn't notice the database changes made by a separate process. If that's the case, then it should work to run your command and then restart the server. Although I can't imagine that would be any better than just upgrading the module.

Upvotes: 1

Related Questions