Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
27242 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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
Awatar
Odrzuć
Najlepsza odpowiedź

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
Awatar
Odrzuć
Najlepsza odpowiedź

--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
Awatar
Odrzuć
Najlepsza odpowiedź

You have to put 

without_demo = True

inside the configuration file 

Awatar
Odrzuć