~openerp-community/openobject-doc/6.1

« back to all changes in this revision

Viewing changes to source/book/8/8_20_Config/8_20_Config_menu.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-19 19:02:35 UTC
  • Revision ID: truongsinh@vipescoserver-20090719190235-fu3bxcrbpvwuk5h7
[FIX] build_i18n.py .. raw:: html

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. index:: 
 
3
   single: menu; configuring
 
4
 
 
5
Configuring the menu
 
6
====================
 
7
 
 
8
Open ERP's menu organization isn't subject to any restriction, so you can modify the whole
 
9
structure, the terminology and all access rights to it to meet your specific needs in the best
 
10
possible way. However, before you do all that and just as you would for any other customizable
 
11
software, you should balance both the benefits you see in such changes and the costs, such as the
 
12
need to train users, to maintain new documentation and to continue the alterations through
 
13
subsequent versions of the software.
 
14
 
 
15
This section describes how to proceed to change the structure of the menu and the welcome page, to
 
16
configure the terminology of the menus and forms in the user interface and for managing users'
 
17
access rights to the menus and the various underlying business objects.
 
18
 
 
19
.. index::
 
20
   single: menu; duplicating
 
21
 
 
22
Changing the menu
 
23
-----------------
 
24
 
 
25
As administrator, and using the web client, select a menu item (but don't click it).
 
26
Click on the line containing
 
27
:menuselection:`Administration --> Translations --> Import/Export --> Export a Translation File`
 
28
(but not on the string \ ``Export a Translation File``\   itself) and click the 
 
29
:guilabel:`Switch` button to bring up the menu item as an
 
30
editable form (you can do the same using the GTK client – there you select the line and click the
 
31
:guilabel:`View` button instead).
 
32
 
 
33
You could now edit this form (**but don't do that, read the next paragraph first!**) – change 
 
34
its :guilabel:`Parent Menu`, which moves the entry to a
 
35
different part of the menu system; edit its :guilabel:`Menu` name to change how it appears in the
 
36
menu tree, or give it a new :guilabel:`Icon`. Or you could give it a new :guilabel:`Action` entirely
 
37
(but this would lose the point of this particular exercise).
 
38
 
 
39
Instead of editing this form, which is the original menu entry, duplicate it. With the web
 
40
client you must first make the form read-only by clicking the :guilabel:`Cancel` button, then you
 
41
click the :guilabel:`Duplicate` button that appears (in the GTK client, click :menuselection:`Form
 
42
--> Duplicate`  from the top menu). The form that remains is now the duplicate entry, not the
 
43
original.
 
44
 
 
45
To move this duplicate entry, change the :guilabel:`Parent Menu` field by deleting what's there and
 
46
replacing it with another menu that everyone can see, such as :guilabel:`Tools` or :guilabel:`Human
 
47
Resources`, and make sure that the entry moves to the end of the menu list by replacing the
 
48
:guilabel:`Sequence` with \ ``99``\  . You can experiment with icons if you like. Save the form and
 
49
then click :guilabel:`Main Menu` to see the results.
 
50
 
 
51
.. tip:: Duplicating the menu
 
52
 
 
53
   If you're planning to modify a menu you should duplicate it first.
 
54
   In this way you'll always keep a link to the original menu that works if you need it to.
 
55
 
 
56
.. index:: 
 
57
   single: welcome page
 
58
   
 
59
Personalizing the welcome page for each user
 
60
--------------------------------------------
 
61
 
 
62
When you sign into Open ERP for the first time, a welcome page appears. In a minimal system, such
 
63
as that created in the original \ ``openerp_ch02``\  database before it was expanded in 
 
64
:ref:`ch-guided`, and in the  \ ``openerp_ch03``\  database, you only get the main menu – the same as you
 
65
get by default when you click the :menuselection:`Main Menu` button. As you add functionality to
 
66
your database you get more choices for the welcome page, with different dashboards automatically
 
67
assigned to various company roles as they're created in the demonstration data.
 
68
 
 
69
The administrator can change both the welcome page and the main menu page individually for each user
 
70
of the system, and can adapt Open ERP to each role in the company to best fit the needs of everyone.
 
71
 
 
72
To make modifications for a particular user, edit the user configuration again in
 
73
:menuselection:`Administration --> Users --> Users`. Open the form for a particular user, and select
 
74
different menu entries for the two fields :guilabel:`Home Action` and :guilabel:`Menu Action`.
 
75
 
 
76
.. figure::  images/new_home.png
 
77
   :scale: 75
 
78
   :align: center
 
79
 
 
80
   *Selecting a new welcome page*
 
81
 
 
82
The :guilabel:`Home Action` is the menu item that is automatically opened when you first sign on,
 
83
and is also reached when you click the :guilabel:`Home` link in the top right toolbar of the web
 
84
client. There you can choose any page that you'd reach through any menu – one of the dashboards
 
85
could be most useful. The :guilabel:`Menu Action` is the one you reach through the :guilabel:`Main
 
86
Menu` button in the web client (the :guilabel:`Menu` button in the GTK client). You can choose the
 
87
main menu and the dashboards there.
 
88
 
 
89
.. tip:: Actions on the administrator's menu
 
90
 
 
91
        It's very easy to change the welcome page and the menu of the different users.
 
92
        However, you shouldn't change the main administrator's menu because you could make certain menus
 
93
        completely inaccessible by mistake.
 
94
 
 
95
.. index:: 
 
96
   single: field; default value
 
97
   
 
98
Assigning default values to fields
 
99
----------------------------------
 
100
 
 
101
You can quite easily configure the system to put default values in various fields as you open new
 
102
forms. This enables you to pre-complete the fields with default data to simplify your users' work in
 
103
entering new documents.
 
104
 
 
105
* If you're using the web client hold :kbd:`Ctrl` down and Right-Click at the same time (that's a mouse right-click while the mouse
 
106
  pointer is in the field and the Control key is held down on the keyboard).
 
107
 
 
108
* If you're using the GTK client, you just need to right-click the mouse while the pointer is in the
 
109
  field.
 
110
  
 
111
An administrator has the choice of making the default work just for that user, or for all users of the database.
 
112
 
 
113
.. figure::  images/set_default.png
 
114
   :scale: 75
 
115
   :align: center
 
116
 
 
117
   *Inserting a new default value*
 
118
 
 
119
To check this new configuration, open a new partner form: the field :guilabel:`Country` should now
 
120
contain the entry \ ``New Zealand``\  .
 
121
 
 
122
This is a very powerful feature! An administrator can use this functionality to redefine the
 
123
behavior of your whole system. You can test that in database \ ``openerp_ch13``\   by opening up a
 
124
new :guilabel:`Purchase Order` form, clicking the second tab :guilabel:`Purchase Shippings`,
 
125
selecting \ ``From Picking``\   in the :guilabel:`Invoicing Control` field and then making that the
 
126
default.
 
127
 
 
128
From that moment on, you'd automatically create draft purchase invoices only when goods are
 
129
received, so you could very easily restrict your accountants from paying any invoices that turn up
 
130
until you were sure you had received the goods. It wouldn't stop anyone from selecting another
 
131
method of invoice control, but they'd start with the default definition.
 
132
 
 
133
Changing the terminology
 
134
------------------------
 
135
 
 
136
You can use Open ERP's language translation functionality to substitute its standard terminology
 
137
with terminology that fits your company better. It's quite straightforward to adapt the software
 
138
with different terms specific to your industry. Moreover, this can strengthen acceptance of your new
 
139
Open ERP system, because everybody will be able to retain their usual vocabulary.
 
140
 
 
141
You can do this one of two ways:
 
142
 
 
143
* translate them in a CSV file, which gives you a global overview of all of the system terms so that
 
144
  you can search and replace specific occurrences everywhere,
 
145
 
 
146
* translate the phrases directly in the client, which means that you can change them in their
 
147
  context, and that can be helpful to you while you're translating.
 
148
 
 
149
The same approach is used to translate terms that haven't been created yet. This can be useful, for
 
150
example, with modules that haven't yet been translated into English or any other language that you
 
151
want.
 
152
 
 
153
.. index::
 
154
   single: translation
 
155
 
 
156
Translation through a CSV file
 
157
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
158
 
 
159
To translate or modify all of the system's phrases you first have to export a translation file in
 
160
CSV form. And to do that, you have to install a language into Open ERP. To load a translation
 
161
that already exists in Open ERP use
 
162
:menuselection:`Administration --> Translations --> Load an Official Translation`
 
163
choose a language and then click :guilabel:`Start Installation`.
 
164
 
 
165
Then export it using 
 
166
:menuselection:`Administration --> Translations --> Import/Export --> Export a Translation file. 
 
167
Select the language, then the :guilabel:`CSV File` format, then one or more (or all) modules.
 
168
Click :guilabel:`Get File` to start the download process, then click the small 
 
169
:guilabel:`Save` icon to save the file somewhere. A French translation would be
 
170
named :file:`fr_FR.csv` by default, but you can name it whatever you like. 
 
171
 
 
172
.. note:: UTF-8 format
 
173
 
 
174
        The CSV file is encoded in the UTF-8 format.
 
175
        Make sure that you retain this format when you open the file in a spreadsheet program because
 
176
        if you **don't** retain it you risk seeing strange character strings in place of accented
 
177
        characters.
 
178
 
 
179
.. figure::  images/csv_transl.png
 
180
   :scale: 75
 
181
   :align: center
 
182
 
 
183
   *CSV translation file with a translation in view*
 
184
 
 
185
The file contains six columns: :guilabel:`module` , 
 
186
:guilabel:`type` , :guilabel:`name`, :guilabel:`res_id`,
 
187
:guilabel:`src`, and :guilabel:`value`. You have to ensure that the first line, which specifies
 
188
these column names, remains untouched. 
 
189
 
 
190
The :guilabel:`src`  field contains the base text in English,
 
191
and the :guilabel:`value` field contains a translation into another conventional language or into a
 
192
specialist technical phrase. If there's nothing at all in the :guilabel:`value` field then the
 
193
English translation will automatically be used on the the form you see.
 
194
 
 
195
.. tip:: Where should you modify the text?
 
196
 
 
197
   Most of the time, you will find the text that you want to modify in several lines of the CSV
 
198
   file.
 
199
   Which line should you modify?
 
200
   Refer to the two columns :guilabel:`type` (in column B) and :guilabel:`name` (in column C).
 
201
   Some lines have the name :guilabel:`ir.ui.menu` in the :guilabel:`name` column which shows that this is a menu entry.
 
202
   Others have :guilabel:`selection` in the :guilabel:`type` column, which indicates that you'd see this entry in a drop-down
 
203
   menu.
 
204
 
 
205
You should then load the new file into your Open ERP system using the menu
 
206
:menuselection:`Administration --> Translations --> Import/Export --> Import a Translation file`. 
 
207
You've then got two ways forward:
 
208
 
 
209
* you can overwrite the previous translation by using the same name as before (so you could have a
 
210
  special 'standard French' translation by reusing the :guilabel:`Name` \ ``Français``\   and
 
211
  :guilabel:`Code` \ ``fr_FR``\  ),
 
212
 
 
213
* you could create a new translation file which users can select in their :guilabel:`Preferences`.
 
214
 
 
215
If you're not connected to the translated language, click :guilabel:`Preferences`, select the
 
216
language in :guilabel:`Language` and finally click :guilabel:`OK` to load the new language with its
 
217
new terminology.
 
218
 
 
219
.. tip:: Partial translations
 
220
 
 
221
   You can load a selection of the lines in a translation file by deleting most of the lines in the
 
222
   file and then loading back only the changed ones. Open ERP then changes only the uploaded lines
 
223
   and leaves the original ones alone.
 
224
 
 
225
Changes through the client interface
 
226
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
227
 
 
228
You can also change labels and other screen items on screen in the web client. 
 
229
To do that, open the form that you want to translate, then click the 
 
230
:guilabel:`Translate this resource.` icon to its top right. 
 
231
You then have the choice of translating:
 
232
 
 
233
* the data in the system (contained in the :guilabel:`Fields`),
 
234
 
 
235
* the field titles (the :guilabel:`Labels`),
 
236
 
 
237
* all of the :guilabel:`Action` buttons to the right of the form (the :guilabel:`Relates` option),
 
238
 
 
239
* the terms used in the form :guilabel:`View`.
 
240
 
 
241
You can modify any of these.
 
242
 
 
243
The procedure is slightly different using the GTK client. In this you just right-click on a label or button
 
244
with the mouse. You can choose to translate the item itself or the whole view.
 
245
 
 
246
This method is simple and quick when you only have a few entries to modify, but it can become
 
247
tiresome and you can lose a lot of time if you've got to change some terms across the whole system.
 
248
 
 
249
In that case it would be better to use the translation method that employs a CSV file.
 
250
 
 
251
.. tip:: Tacking account of translations
 
252
 
 
253
   In the GTK client the modified terms aren't updated immediately.
 
254
   To see the effects of the modifications you must close the current window and then reopen the
 
255
   form.
 
256
 
 
257
.. Copyright © Open Object Press. All rights reserved.
 
258
 
 
259
.. You may take electronic copy of this publication and distribute it if you don't
 
260
.. change the content. You can also print a copy to be read by yourself only.
 
261
 
 
262
.. We have contracts with different publishers in different countries to sell and
 
263
.. distribute paper or electronic based versions of this book (translated or not)
 
264
.. in bookstores. This helps to distribute and promote the Open ERP product. It
 
265
.. also helps us to create incentives to pay contributors and authors using author
 
266
.. rights of these sales.
 
267
 
 
268
.. Due to this, grants to translate, modify or sell this book are strictly
 
269
.. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
 
270
.. written authorisation for this.
 
271
 
 
272
.. Many of the designations used by manufacturers and suppliers to distinguish their
 
273
.. products are claimed as trademarks. Where those designations appear in this book,
 
274
.. and Open Object Press was aware of a trademark claim, the designations have been
 
275
.. printed in initial capitals.
 
276
 
 
277
.. While every precaution has been taken in the preparation of this book, the publisher
 
278
.. and the authors assume no responsibility for errors or omissions, or for damages
 
279
.. resulting from the use of the information contained herein.
 
280
 
 
281
.. Published by Open Object Press, Grand Rosière, Belgium
 
282