تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
27338 أدوات العرض

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?

الصورة الرمزية
إهمال
أفضل إجابة

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
الصورة الرمزية
إهمال
أفضل إجابة

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
الصورة الرمزية
إهمال
أفضل إجابة

--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
الصورة الرمزية
إهمال
أفضل إجابة

You have to put 

without_demo = True

inside the configuration file 

الصورة الرمزية
إهمال