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 ?
    ./openerp-server.py --init=product --without-demo=product -d my_database

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

Lionel.

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Jay Vora (Serpent Consulting Services)
Solved:
2010-01-18
Last query:
2010-01-18
Last reply:
2010-01-18

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 __terp.py? 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.
./openerp-server.py --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

Jay,
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?
Lionel.

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.

Thanks.

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.