Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
17545 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Autore

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

You are welcome :-)

Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
feb 23
25469
3
dic 23
21958
2
mar 24
9828
1
ago 25
483
2
lug 25
2918