This question has been flagged
4 Replies
15781 Views

I'm writing Restful API on Openerp v7. I'm going to create one Database for one user.I want to install Account, Sale and Purchase modules at the time new Database creation. I tried by modifying __openerp__.py in each module, changing auto_install=True, and 'web' module to depend on Account, Sale and Purchase, still it's not installing. Please help me to get out of this problem..! Thanks...

Avatar
Discard
Best Answer

Just create a new basic module that depends on all the modules you want to install and then make this module install itself automatically or do it manually.

You can set the dependencies in the __openerp__.py file

Note: Make sure to restart your server so that the changes take effect.

Update: auto_install doesn't do what its name implies, check this question

So it appears that you will have to manually install that custom module.

Avatar
Discard
Author

Thanks Karim for your suggestion. I tried what you suggest, but it's not installing account module. I tried 1) Modified base module's __openerp__.py file, depends on account, it showed Unmet dependency. 2) Modified web module's __openerp__.py file, depends on account, it is not working. 3) create one own module, depends on account and made auto install, it is also not installing. can you please give one example for installing account module.

Author

Thank you so much Karim. Finally i got this :)

You are welcome :-)

Best Answer

Using "auto_install" alone did not work for me. What i did was install the modules when openerp is started using command line options. From command-line I set the --addons_path and then use "-i MyModulesName -d DatabaseName".

DatabaseName can be "all" to install in all databases.

The same can be used in the startup-daemon, automatically installing for new databases.

Avatar
Discard
Best Answer

Using "auto_install" alone did not work for me. What i did was install the modules when openerp is started using command line options. From command-line I set the --addons_path and then use "-i MyModulesName -d DatabaseName".

 

What is this command line? You typed it manually or added somehwere?

Regards

Bilal

Avatar
Discard
Best Answer

To install a module automatically when the database is created you have to set:

"auto_install": True

in the __openerp__.py file for the module and all its dependencies.

This means that you have to set auto_install on the dependencies of its dependencies, as well.

Avatar
Discard