Shoudl I re-initialize the module "product" ?

Asked by Numérigraphe on 2009-07-27

On a production database, I deleted the default price lists included in the module "product".
Now I would like to get them back to simplify things.

Would it be advisable to re-init the module ike this ?
    ./ --init=product --without-demo=product -d my_database

Do I risk losing data, customizations and/or configuration ?


Question information

English Edit question
Odoo Addons (MOVED TO GITHUB) Edit question
No assignee Edit question
Solved by:
Jay Vora (Serpent Consulting Services)
Last query:
Last reply:

Hello ,

When I am trying to remove default price lists it has given me Integrity Error.
So Can you tell me that in your database are you include tiny demo data
or not but in both situation default pricelist is not removed when i am trying to remove.

Numérigraphe (numerigraphe) said : #2

I didn't use demo data. That DB was created when 5.0 was just out, maybe deleting the default pricelist was allowed...
Anyway, would you be so kind as to explain what the --init switch does, please?
Does it just reload the XML files in the init_xml section of Or need I take extra care before I use it?

--init will just reinstall the module.

so the following command will reinstall your product module if your database is created without demo data.
./ --init=product --without-demo=True -d my_database.

Hello Lionel,

Can you please focus here ? IF solved, set as closed.

Numérigraphe (numerigraphe) said : #5

Sorry, my initial question remains unanswered. I'd like to reintroduce the default price lists - would reinstalling the module work, or would it damage the data in any way?

Hello Lionel,

Re-installation would simply load demo-data(if loaded earlier) and xml views and column definitions.

If it was the record created by you manually,reinstall cannot help you.

Updating the module,will lose your customization if made on xml records (By GUI).No data will be lost.


Numérigraphe (numerigraphe) said : #7

Thanks Jay (Open ERP), that solved my question.

Numérigraphe (numerigraphe) said : #8

For you information, I ran the server with --init=product --without-demo=product, and it fixed my pricelist problem.
However as a side effect, it also reset all the names and prefixes/suffixes of the sequences, so I had to reconfigure them.