Se rendre au contenu
Menu
Cette question a été signalée
4 Réponses
27444 Vues

I want to create a database with only the technical features. I set "without demo = all" in my config file. But it seems doesn't work. The demo data still appears when I try to install my first module like 'warehouse management' on a new database.

I know in __openerp__.py of every module, there is a "demo" field. but some module has a lot dependencies, I can not comment all "demo" fields.

Is there a better way to disable demo data?

Avatar
Ignorer
Meilleure réponse

I think you should recreate your database from scratch (if you use database manager, just don't check the demo data checkbox).

If you use the service from command line (or just have access to the configuration file), so the right syntax is:

without_demo=all

or with the command line:

--without-demo=all
Avatar
Ignorer
Meilleure réponse

In the command line, type

./odoo.py --help

You will see that the syntax should be

--without-demo=WITHOUT_DEMO

In config file, it should be

without_demo=WITHOUT_DEMO
Avatar
Ignorer
Meilleure réponse

--without-demo=all does not work at all. It good to test it with hr module.

It is extreme solution, but works for hr module on Ubuntu 14.04

cd  ${HOME}/odoo 
cp addons/hr/__openerp__.py addons/hr/__openerp__.py.orig
perl -pi -e 's/^(.*)(demo)(.*)/# ${1}${2}${3}/' addons/hr/__openerp__.py
cat addons/hr/__openerp__.py
Avatar
Ignorer
Meilleure réponse

You have to put 

without_demo = True

inside the configuration file 

Avatar
Ignorer