Creating the database Database Creation

42 Once configuration is complete you are connected to your OpenERP system. Its functionality is very limited because you have selected a Simplified interface with no application installed, but this is sufficient to demonstrate that your installation is working. Figure 6.10: Defining your company during initial database configuration

6.3.3 Managing Databases

As a super-administrator you do not only have rights to create new databases, but also to: • delete databases, • backup databases, • restore databases. All of these operations can be carried out from the menu File → Databases... in the GTK client, or from the Databases button in the web client’s Login screen. Tip: Duplicating a database To duplicate a database you can: 1. make a backup file on your PC from this database. 2. restore this database from the backup file on your PC, giving it a new name as you do so. This can be a useful way of making a test database from a production database. You can try out the operation of a new configuration, new modules, or just the import of new data. A system administrator can configure OpenERP to restrict access to some of these database functions so that your security is enhanced in normal production use. You are now ready to use databases from your installation to familiarize yourself with the administration and use of OpenERP.

6.4 New OpenERP functionality

The database you have created and managed so far is based on the core OpenERP functionality that you installed. The core system is installed in the file system of your OpenERP application server, but only installed into an OpenERP database as you require it, as is described in the next chapter, Guided Tour . What if you want to update what is there, or extend what is there with additional modules? • To update what you have, you would install a new instance of OpenERP using the same techniques as described earlier in this section, Database Creation . 43 • To extend what you have, you would install new modules in the addons directory of your current OpenERP installation. There are several ways of doing that. In both cases you will need to be a root user or Administrator of your OpenERP application server.

6.4.1 Extending Open ERP

To extend OpenERP you will need to copy modules into the addons directory. That is in your server’s openerp-server directory which differs between Windows, Mac and some of the various Linux distribu- tions and not available at all in the Windows all-in-one installer. If you look there you will see existing modules such as product and purchase. A module can be provided in the form of files within a directory or a a zip-format file containing that same directory structure. You can add modules in two main ways – through the server, or through the client. To add new modules through the server is a conventional system administration task. As root user or another suitable user, you would put the module in the addons directory and change its permissions to match those of the other modules. To add new modules through the client you must first change the permissions of the addons directory of the server, so that it is writeable by the server. That will enable you to install OpenERP modules us- ing the OpenERP client a task ultimately carried out on the application server by the server software. Tip: Changing permissions A very simple way of changing permissions on the Linux system you are using to develop an OpenERP application is to execute the command sudo chmod 777 path_to_addons where path_to_addons is the full path to the addons directory, a location like usrlibpython2.5site-packagesopenerp- serveraddons. Any user of OpenERP who has access to the relevant administration menus can then upload any new functionality, so you would certainly disable this capability for production use. You will see examples of this uploading as you make your way through this book.