3
.. i18n: single: database; create
4
.. i18n: single: database
8
single: database; create
11
.. i18n: .. _sect-dbcreate:
13
.. i18n: Database creation
14
.. i18n: =================
22
.. i18n: Use the technique outlined in this section to create a new database, \ ``openerp_ch01``\ . This
23
.. i18n: database will contain the demonstration data provided with OpenERP and a large proportion of the
24
.. i18n: core Open ERP functionality. You'll need to know your super administrator password for this – or
25
.. i18n: you'll have to find somebody who does have it to create this seed database.
28
Use the technique outlined in this section to create a new database, \ ``openerp_ch01``\ . This
29
database will contain the demonstration data provided with OpenERP and a large proportion of the
30
core Open ERP functionality. You'll need to know your super administrator password for this – or
31
you'll have to find somebody who does have it to create this seed database.
34
.. i18n: single: password; super-administrator
35
.. i18n: single: password; superadmin
39
single: password; super-administrator
40
single: password; superadmin
42
.. i18n: .. note:: The super-administrator password
44
.. i18n: Anyone who knows the super-administrator password has complete access to the data on the server
45
.. i18n: – able to read, change and delete any of the data in any of the databases there.
47
.. i18n: After first installation, the password is ``admin``. This is the hard-coded default, and
48
.. i18n: is used if there is no accessible server configuration file. If your system has been
49
.. i18n: set up so that the server configuration file can be written to by the server then
50
.. i18n: you can change the password through the client. Or you could deliberately make the
51
.. i18n: configuration file read-only so that there is no prospect of changing it from the client.
52
.. i18n: Either way, a server systems administrator can change it if you forget it.
54
.. i18n: So if your system is set u to allow it, you can change the superadmin password through the GTK client
55
.. i18n: from the menu :menuselection:`File --> Databases --> Administrator Password`, or through the
56
.. i18n: web client by logging out (click the :guilabel:`Logout` link), clicking :guilabel:`Databases` on the
57
.. i18n: login screen, and then clicking the :guilabel:`Password` button on the Management screen.
59
.. i18n: The location of the server configuration file is typically defined by starting the server with
60
.. i18n: the ``--config`` command line option.
63
.. note:: The super-administrator password
65
Anyone who knows the super-administrator password has complete access to the data on the server
66
– able to read, change and delete any of the data in any of the databases there.
68
After first installation, the password is ``admin``. This is the hard-coded default, and
69
is used if there is no accessible server configuration file. If your system has been
70
set up so that the server configuration file can be written to by the server then
71
you can change the password through the client. Or you could deliberately make the
72
configuration file read-only so that there is no prospect of changing it from the client.
73
Either way, a server systems administrator can change it if you forget it.
75
So if your system is set u to allow it, you can change the superadmin password through the GTK client
76
from the menu :menuselection:`File --> Databases --> Administrator Password`, or through the
77
web client by logging out (click the :guilabel:`Logout` link), clicking :guilabel:`Databases` on the
78
login screen, and then clicking the :guilabel:`Password` button on the Management screen.
80
The location of the server configuration file is typically defined by starting the server with
81
the ``--config`` command line option.
83
.. i18n: .. figure:: images/change_superadmin_pwd.png
85
.. i18n: :align: center
87
.. i18n: *Changing the super-administrator password through the web client*
90
.. figure:: images/change_superadmin_pwd.png
94
*Changing the super-administrator password through the web client*
96
.. i18n: .. _sect-creatingdb:
98
.. i18n: Creating the database
99
.. i18n: ---------------------
104
Creating the database
105
---------------------
107
.. i18n: If you're using the GTK client, choose :menuselection:`Files --> Databases --> New database` in
108
.. i18n: the menu at the top left. Enter the super-administrator password, then the name of the new database
109
.. i18n: you're creating.
112
If you're using the GTK client, choose :menuselection:`Files --> Databases --> New database` in
113
the menu at the top left. Enter the super-administrator password, then the name of the new database
116
.. i18n: .. figure:: images/create_new_db_GTK.png
118
.. i18n: :align: center
120
.. i18n: *Creating a new database through the GTK client*
123
.. figure:: images/create_new_db_GTK.png
127
*Creating a new database through the GTK client*
129
.. i18n: If you're using the web client, click :guilabel:`Databases` on the login screen, then
130
.. i18n: :guilabel:`Create` on the database management page. Enter the super-administrator password, and the
131
.. i18n: name of the new database you're creating.
133
.. i18n: In both cases you'll see a checkbox that determines whether you load demonstration data or not.
134
.. i18n: The consequences of checking this box or not affect the **whole use** of this database.
137
If you're using the web client, click :guilabel:`Databases` on the login screen, then
138
:guilabel:`Create` on the database management page. Enter the super-administrator password, and the
139
name of the new database you're creating.
141
In both cases you'll see a checkbox that determines whether you load demonstration data or not.
142
The consequences of checking this box or not affect the **whole use** of this database.
144
.. i18n: In both cases you'll also see that you can choose the Administrator password. This makes your
145
.. i18n: database quite secure because you can ensure that it is unique from the outset.
146
.. i18n: (In fact many people find it hard to resist ``admin`` as their password!)
149
In both cases you'll also see that you can choose the Administrator password. This makes your
150
database quite secure because you can ensure that it is unique from the outset.
151
(In fact many people find it hard to resist ``admin`` as their password!)
153
.. i18n: Database openerp_ch01
154
.. i18n: ---------------------
157
Database openerp_ch01
158
---------------------
161
.. i18n: pair: account; user
167
.. i18n: Wait for the message showing that the database has been successfully created, along with the user
168
.. i18n: accounts and passwords (\ ``admin/XXXX``\ and \ ``demo/demo``\ ). Now you've created this seed
169
.. i18n: database you can extend it without having to know the super-administrator password.
172
Wait for the message showing that the database has been successfully created, along with the user
173
accounts and passwords (\ ``admin/XXXX``\ and \ ``demo/demo``\ ). Now you've created this seed
174
database you can extend it without having to know the super-administrator password.
177
.. i18n: single: access; LDAP
178
.. i18n: single: LDAP
179
.. i18n: pair: password; username
180
.. i18n: single: access; user
186
pair: password; username
189
.. i18n: .. tip:: User Access
191
.. i18n: The combination of username/password is specific to a single database. If you have administrative
192
.. i18n: rights to a database you can modify all users.
195
.. i18n: single: module; users_ldap
197
.. i18n: Alternatively you can install the :mod:`users_ldap` module, which manages the authentication of users
198
.. i18n: in LDAP (the Lightweight Directory Access Protocol, a standard system), and connect it to several
199
.. i18n: Open ERP databases. Using this, many databases can share the same user account details.
204
The combination of username/password is specific to a single database. If you have administrative
205
rights to a database you can modify all users.
208
single: module; users_ldap
210
Alternatively you can install the :mod:`users_ldap` module, which manages the authentication of users
211
in LDAP (the Lightweight Directory Access Protocol, a standard system), and connect it to several
212
Open ERP databases. Using this, many databases can share the same user account details.
214
.. i18n: .. note:: Failure to create a database
216
.. i18n: How do you know if you've successfully created your new database?
217
.. i18n: You're told if the database creation has been unsuccessful.
218
.. i18n: If you have entered a database name using prohibited characters (or no name, or too short a name)
219
.. i18n: you will be alerted by the dialog box :guilabel:`Bad database name!` explaining how to correct the error.
220
.. i18n: If you've entered the wrong super-administrator password or a name already in use
221
.. i18n: (some names can be reserved without your knowledge), you'll be alerted by the dialog box
222
.. i18n: :guilabel:`Error during database creation!`.
225
.. note:: Failure to create a database
227
How do you know if you've successfully created your new database?
228
You're told if the database creation has been unsuccessful.
229
If you have entered a database name using prohibited characters (or no name, or too short a name)
230
you will be alerted by the dialog box :guilabel:`Bad database name!` explaining how to correct the error.
231
If you've entered the wrong super-administrator password or a name already in use
232
(some names can be reserved without your knowledge), you'll be alerted by the dialog box
233
:guilabel:`Error during database creation!`.
235
.. i18n: Connect to the database \ ``openerp_ch01``\ that you just created, using the default administrator
239
Connect to the database \ ``openerp_ch01``\ that you just created, using the default administrator
242
.. i18n: If this is the first time you've connected to this database you'll be asked a series of questions to
243
.. i18n: define the database parameters:
246
If this is the first time you've connected to this database you'll be asked a series of questions to
247
define the database parameters:
249
.. i18n: #. :guilabel:`Select a profile` : select \ ``Minimal Profile``\ and click :guilabel:`Next`.
251
.. i18n: #. :guilabel:`Company Details` : replace the proposed default of \ ``Tiny sprl``\ by your own
252
.. i18n: company name, complete as much of your address as you like, and add some lines about your company,
253
.. i18n: such as a slogan and any statutory requirements, to the header and footer fields. Click
254
.. i18n: :guilabel:`Next`.
256
.. i18n: #. :guilabel:`Summary` : check the information and go back to make any modifications you need
257
.. i18n: before installation. Then click :guilabel:`Install`.
259
.. i18n: #. :guilabel:`Installation Completed` : click :guilabel:`Ok`.
262
#. :guilabel:`Select a profile` : select \ ``Minimal Profile``\ and click :guilabel:`Next`.
264
#. :guilabel:`Company Details` : replace the proposed default of \ ``Tiny sprl``\ by your own
265
company name, complete as much of your address as you like, and add some lines about your company,
266
such as a slogan and any statutory requirements, to the header and footer fields. Click
269
#. :guilabel:`Summary` : check the information and go back to make any modifications you need
270
before installation. Then click :guilabel:`Install`.
272
#. :guilabel:`Installation Completed` : click :guilabel:`Ok`.
274
.. i18n: Once configuration is complete you're connected to your Open ERP system. Its functionality is very
275
.. i18n: limited because you've selected a minimal installation, but this is sufficient to demonstrate that
276
.. i18n: your installation is working.
279
Once configuration is complete you're connected to your Open ERP system. Its functionality is very
280
limited because you've selected a minimal installation, but this is sufficient to demonstrate that
281
your installation is working.
283
.. i18n: .. figure:: images/define_main_co_dlg.png
284
.. i18n: :align: center
287
.. i18n: *Defining your company during initial database configuration*
290
.. figure:: images/define_main_co_dlg.png
294
*Defining your company during initial database configuration*
297
.. i18n: single: database; manage
301
single: database; manage
303
.. i18n: Managing databases
304
.. i18n: ------------------
310
.. i18n: As a super-administrator you've not only got rights to create new databases, but also to:
313
As a super-administrator you've not only got rights to create new databases, but also to:
315
.. i18n: * delete databases,
317
.. i18n: * backup databases,
319
.. i18n: * restore databases.
328
.. i18n: All of these operations can be carried out from the menu :menuselection:`File --> Databases... -->
329
.. i18n: Backup databases` in the GTK client, or from the :guilabel:`Database` button in the web client's
330
.. i18n: :guilabel:`Login` screen.
333
All of these operations can be carried out from the menu :menuselection:`File --> Databases... -->
334
Backup databases` in the GTK client, or from the :guilabel:`Database` button in the web client's
335
:guilabel:`Login` screen.
338
.. i18n: single: database; duplicate
342
single: database; duplicate
344
.. i18n: .. tip:: Duplicating a database
346
.. i18n: To duplicate a database you can:
348
.. i18n: #. make a backup file on your PC from this database.
350
.. i18n: #. restore this database from the backup file on your PC, giving it a new name as you do so.
352
.. i18n: This can be a useful way of making a test database from a production database. You can try out the
353
.. i18n: operation of a new configuration, new modules, or just the import of new data.
356
.. tip:: Duplicating a database
358
To duplicate a database you can:
360
#. make a backup file on your PC from this database.
362
#. restore this database from the backup file on your PC, giving it a new name as you do so.
364
This can be a useful way of making a test database from a production database. You can try out the
365
operation of a new configuration, new modules, or just the import of new data.
368
.. i18n: single: access
374
.. i18n: A system administrator can configure Open ERP to restrict access to some of these database functions
375
.. i18n: so that your security is enhanced in normal production use.
378
A system administrator can configure Open ERP to restrict access to some of these database functions
379
so that your security is enhanced in normal production use.
381
.. i18n: You are now ready to use databases from your installation to familiarize yourself with the
382
.. i18n: administration and use of Open ERP.
385
You are now ready to use databases from your installation to familiarize yourself with the
386
administration and use of Open ERP.
388
.. i18n: New Open ERP functionality
389
.. i18n: ==========================
392
New Open ERP functionality
393
==========================
395
.. i18n: The database you've created and managed so far is based on the core Open ERP functionality that you
396
.. i18n: installed. The core system is installed in the file system of your Open ERP application server, but
397
.. i18n: only installed into an Open ERP database as you require it, as is described in the next chapter, :ref:`ch-guided`.
400
The database you've created and managed so far is based on the core Open ERP functionality that you
401
installed. The core system is installed in the file system of your Open ERP application server, but
402
only installed into an Open ERP database as you require it, as is described in the next chapter, :ref:`ch-guided`.
404
.. i18n: What if want to update what's there, or extend what's there with additional modules?
407
What if want to update what's there, or extend what's there with additional modules?
409
.. i18n: * To update what you have, you'd install a new instance of Open ERP using the same techniques as
410
.. i18n: described earlier in this section, :ref:`sect-dbcreate`.
412
.. i18n: * To extend what you have, you'd install new modules in the ``addons`` directory of your current
413
.. i18n: Open ERP installation. There are several ways of doing that.
416
* To update what you have, you'd install a new instance of Open ERP using the same techniques as
417
described earlier in this section, :ref:`sect-dbcreate`.
419
* To extend what you have, you'd install new modules in the ``addons`` directory of your current
420
Open ERP installation. There are several ways of doing that.
423
.. i18n: pair: system; administrator
427
pair: system; administrator
429
.. i18n: In both cases you'll need briefly to be a \ ``root``\ user or \ ``Administrator``\ of your
430
.. i18n: Open ERP application server.
433
In both cases you'll need briefly to be a \ ``root``\ user or \ ``Administrator``\ of your
434
Open ERP application server.
436
.. i18n: Extending Open ERP
437
.. i18n: ------------------
443
.. i18n: To extend Open ERP you'll need to copy modules into the \ ``addons``\ directory. That's in
444
.. i18n: your server's \ ``openerp-server``\ directory (which differs between Windows, Mac and some of the
445
.. i18n: various Linux distributions and not available at all in the Windows all-in-one installer).
448
To extend Open ERP you'll need to copy modules into the \ ``addons``\ directory. That's in
449
your server's \ ``openerp-server``\ directory (which differs between Windows, Mac and some of the
450
various Linux distributions and not available at all in the Windows all-in-one installer).
453
.. i18n: single: module; product
454
.. i18n: single: module; purchase
458
single: module; product
459
single: module; purchase
461
.. i18n: If you look there you'll see existing modules such as :mod:`product` and :mod:`purchase`. A
462
.. i18n: module can be provided in the form of files within a directory or a a zip-format file containing
463
.. i18n: that same directory structure.
466
If you look there you'll see existing modules such as :mod:`product` and :mod:`purchase`. A
467
module can be provided in the form of files within a directory or a a zip-format file containing
468
that same directory structure.
470
.. i18n: You can add modules in two main ways – through the server, or through the client.
473
You can add modules in two main ways – through the server, or through the client.
476
.. i18n: pair: system; administration
480
pair: system; administration
482
.. i18n: To add new modules through the server is a conventional systems administration task. As \ ``root``\
483
.. i18n: user or other suitable user, you'd put the module in the \ ``addons``\ directory and change its
484
.. i18n: permissions to match those of the other modules.
487
To add new modules through the server is a conventional systems administration task. As \ ``root``\
488
user or other suitable user, you'd put the module in the \ ``addons``\ directory and change its
489
permissions to match those of the other modules.
491
.. i18n: To add new modules through the client you must first change the permissions of the \ ``addons``\
492
.. i18n: directory of the server, so that it is writable by the server. That will enable you to install
493
.. i18n: Open ERP modules using the Open ERP client (a task ultimately carried out on the application
494
.. i18n: server by the server software).
497
To add new modules through the client you must first change the permissions of the \ ``addons``\
498
directory of the server, so that it is writable by the server. That will enable you to install
499
Open ERP modules using the Open ERP client (a task ultimately carried out on the application
500
server by the server software).
503
.. i18n: pair: filesystem; permissions
507
pair: filesystem; permissions
509
.. i18n: .. tip:: Changing permissions
511
.. i18n: A very simple way of changing permissions on the Linux system you're using to develop an Open ERP
512
.. i18n: application is to execute the command sudo chmod 777 <path_to_addons> (where <path_to_addons> is
513
.. i18n: the full path to the addons directory, a location like /usr/lib/python2.5/site-packages/openerp-
514
.. i18n: server/addons).
517
.. tip:: Changing permissions
519
A very simple way of changing permissions on the Linux system you're using to develop an Open ERP
520
application is to execute the command sudo chmod 777 <path_to_addons> (where <path_to_addons> is
521
the full path to the addons directory, a location like /usr/lib/python2.5/site-packages/openerp-
524
.. i18n: Any user of Open ERP who has access to the relevant administration menus can then upload any new
525
.. i18n: functionality, so you'd certainly disable this capability for production use. You'll see examples of
526
.. i18n: this uploading as you make your way through this book.
529
Any user of Open ERP who has access to the relevant administration menus can then upload any new
530
functionality, so you'd certainly disable this capability for production use. You'll see examples of
531
this uploading as you make your way through this book.
533
.. i18n: .. Copyright © Open Object Press. All rights reserved.
536
.. Copyright © Open Object Press. All rights reserved.
538
.. i18n: .. You may take electronic copy of this publication and distribute it if you don't
539
.. i18n: .. change the content. You can also print a copy to be read by yourself only.
542
.. You may take electronic copy of this publication and distribute it if you don't
543
.. change the content. You can also print a copy to be read by yourself only.
545
.. i18n: .. We have contracts with different publishers in different countries to sell and
546
.. i18n: .. distribute paper or electronic based versions of this book (translated or not)
547
.. i18n: .. in bookstores. This helps to distribute and promote the OpenERP product. It
548
.. i18n: .. also helps us to create incentives to pay contributors and authors using author
549
.. i18n: .. rights of these sales.
552
.. We have contracts with different publishers in different countries to sell and
553
.. distribute paper or electronic based versions of this book (translated or not)
554
.. in bookstores. This helps to distribute and promote the OpenERP product. It
555
.. also helps us to create incentives to pay contributors and authors using author
556
.. rights of these sales.
558
.. i18n: .. Due to this, grants to translate, modify or sell this book are strictly
559
.. i18n: .. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
560
.. i18n: .. written authorisation for this.
563
.. Due to this, grants to translate, modify or sell this book are strictly
564
.. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
565
.. written authorisation for this.
567
.. i18n: .. Many of the designations used by manufacturers and suppliers to distinguish their
568
.. i18n: .. products are claimed as trademarks. Where those designations appear in this book,
569
.. i18n: .. and Open Object Press was aware of a trademark claim, the designations have been
570
.. i18n: .. printed in initial capitals.
573
.. Many of the designations used by manufacturers and suppliers to distinguish their
574
.. products are claimed as trademarks. Where those designations appear in this book,
575
.. and Open Object Press was aware of a trademark claim, the designations have been
576
.. printed in initial capitals.
578
.. i18n: .. While every precaution has been taken in the preparation of this book, the publisher
579
.. i18n: .. and the authors assume no responsibility for errors or omissions, or for damages
580
.. i18n: .. resulting from the use of the information contained herein.
583
.. While every precaution has been taken in the preparation of this book, the publisher
584
.. and the authors assume no responsibility for errors or omissions, or for damages
585
.. resulting from the use of the information contained herein.
587
.. i18n: .. Published by Open Object Press, Grand Rosière, Belgium
590
.. Published by Open Object Press, Grand Rosière, Belgium