Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
4 Antworten
17391 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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.

Autor

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

You are welcome :-)

Beste Antwort

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
Verwerfen
Beste Antwort

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Feb. 23
25236
3
Dez. 23
21842
2
März 24
9680
2
Juli 25
2635
3
Juli 25
472