Skip to Content
Menu
This question has been flagged
4 Replies
28065 Views

if i have a new instance with demo data, on every module installation it will import the demo data.

How can i turn demo data off? So that i can install new modules without demo data?

Where does OpenERP 7 saves this information that the demo mode is on?

Avatar
Discard
Best Answer

For each module, the demo field (readonly, boolean) on ir.module.module determines if demo data will be installed when the module is installed.

This relies on the demo tag in the __openerp__.py file

image description

Readonly fields can be changed via code.

Avatar
Discard

hi, Ray. I need to modify demo field via code. My database is not checked "Load Demo Data" field. How can I do it ?

How to turn it on? I can't find this file.

Is it possible to enable the demo data after creating the database?....(demo data is not selected during the time of db creation )

Best Answer


Try the parameter --without-demo=True and no module will load the demo data. 


You can try also a dict to selectively load deo data (but results can be unexpected because the relation between demo on modules).


Try the parameter --without-demo={'module': True} and only the modules specified will load the demo data.

Avatar
Discard
Best Answer

I reject your reality and substitute my own!

After ten years of "this cannot be done", to toggle demo data for all modules to false:

UPDATE ir_module_module SET demo = 'f' WHERE demo = 't';​ 

A more selective WHERE condition can be used to limit it to certain modules.

Avatar
Discard
Best Answer

You must create a new instance.

Demo data is a setting that is turned on/off at the time you create the instance. If you tell it to import demo data at creation you cannot later turn it off.

Avatar
Discard
Author

Yes i know that i have to select on creating, but somewhere openerp have to store the information and i want to change it (like a dirty hack)

I have created new database from the terminal , why this database take demo data i want to remove demo database but create db from the terminal any suggestion