I'm trying to install database with default values to recreate always the same environment. For example: French Chart of account already configured, some modules already installed and a lot of options like manage pricelists, manage warehouses checked....
Because its very boring when I create a fresh new database to check all needed checkboxes, and re-install all the modules I need.
You can create a module that configures the system as you need using XML files. I do not think creating a backup of a database and using it as a template is a good option as it will get out-of-date when modules are updated.
In the module's
__openerp__.py, You may add required default modules to
'depends': . Also, you can set
'auto_install': True to have this module installed for all new databases.
Here is a an example that sets some defaults:
<?xml version="1.0" encoding="utf-8"?> <openerp><data> <!-- Activate Technical Features for Admin --> <record id="base.user_root" model="res.users"> <field name="groups_id" eval="[(4, ref('base.group_no_one'))]"/> </record> <!-- Some configuration settings --> <record id="base.group_user" model="res.groups"> <field name="implied_ids" eval="[(4, ref('base.group_multi_currency')), (4, ref('product.group_sale_pricelist')), (4, ref('product.group_purchase_pricelist')), (4, ref('product.group_uom')), (4, ref('stock.group_production_lot')), (4, ref('stock.group_inventory_valuation')), (4, ref('sale_stock.group_invoice_deli_orders')), (4, ref('analytic.group_analytic_accounting')), (4, ref('sale.group_analytic_accounting')), (4, ref('purchase.group_analytic_accounting'))]"/> </record> <!-- Set sales and purchase invoice based on picking by default --> <function model="ir.values" name="set_default"> <value>purchase.order</value> <value>invoice_method</value> <value>picking</value> </function> <function model="ir.values" name="set_default"> <value>sale.order</value> <value>order_policy</value> <value>picking</value> </function> </data></openerp>
I'm not sure if my answer is even close, but I'll give it a shot..
On the log-in page, there is a Manage Databases link and when the link opens, there is a Backup Menu on the left pane. I think this could be one way to backup the database. However, I was never actually able to use that feature, because I always have the error "Access Denied" but maybe, it might work for you.
The other alternative is to install pgadmin, right click the database and click backup.. as described on this old thread: http://forum.openerp.com/forum/topic27824.html
I have V7.0 on VMPlayer and did some basic settings. In Win7 I made a copy of the Virtual Machine and renamed it. When I need the template copy I start it from VMPlayer and in OpenERP click on settings-updates and than on the button "Update All" in the upper right corner, which updates all modules. You can also make a copy as a backup.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/8/13, 10:57 AM|
|Seen: 7160 times|
|Last updated: 11/10/15, 11:26 AM|