0

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

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
Alchemist777
  • 1,621
  • 5
  • 21
  • 31

2 Answers2

1

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.

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
  • This is the command i give to restart the server sudo /etc/init.d/openerp restart My addons(containg the modules) path is at some folder in 'home'.How do i refer to that modules using '-u'?? – Alchemist777 Apr 10 '12 at 07:08
  • Just specify the module by name, @Alchemist777, don't worry about the path. Any modules you specify in `-u` will be looked for in the addons path that you either specify in your command line or config file. You might find it easier to upgrade your module through the client rather than trying to specify it on the command line. One of the administrative screens is a list of installed modules, and you can request an upgrade there. You'll still have to restart the server if the code has changed. – Don Kirkby Apr 10 '12 at 16:32
  • Your addons path can have several folders separated by commas, if you don't have your own modules in the same place as the core modules. – Don Kirkby Apr 10 '12 at 16:35
1

The following command did the job for me..

sudo /etc/init.d/openerp restart

Alchemist777
  • 1,621
  • 5
  • 21
  • 31