Configuring the Menu¶
OpenERP's menu organization is not subject to any restriction, so you can modify the whole structure, the terminology and all access rights to it to meet your specific needs in the best possible way. However, before you do all that and just as you would for any other customizable software, you should balance both the benefits you see in such changes and the costs, such as the need to train users, to maintain new documentation and to continue the alterations through subsequent versions of the software.
This section describes how to proceed to change the structure of the menu and the welcome page, to configure the terminology of the menus and forms in the user interface, and for managing users' access rights to the menus and the various underlying business objects.
Changing the Menu¶
You can change the way menu items appear and the actions they trigger by using the menu Administration ‣ Customization ‣ User Interface ‣ Menu Items. This opens a search view where you may locate the menu item to be edited by entering its entire name (specified as menu hierarchy) in the Menu field or specifying its immediate parent menu name in Parent Menu.
As an example, locate the menu item Administration/Translations/Import / Export/Export Translation and click on this entry to open its corresponding form. You could now edit this form (but do not do that, read the next paragraph first!) – change its Parent Menu, which moves the entry to a different part of the menu system; edit its Menu name to change how it appears in the menu tree, or give it a new Icon. Or you could give it a new Action entirely (but this would lose the point of this particular exercise).
Instead of editing this form, which is the original menu entry, duplicate it. With the web client you must first make the form read-only by clicking the Cancel button, then you click the Duplicate button that appears (in the GTK client, click Form ‣ Duplicate from the top menu). The form that remains is now the duplicate entry, not the original.
To move this duplicate entry, change the Parent Menu field by deleting what is there and replacing it with another menu that everyone can see, such as Tools or Human Resources, and make sure that the entry moves to the end of the menu list by replacing the Sequence with 99 . You can experiment with icons if you like. Save the form and then reload the page to see the results.
Duplicating the Menu
If you are planning to modify a menu, you should duplicate it first. In this way you will always keep a link to the original menu that works if you need it to.
Personalizing the Welcome Page for Each User¶
Администратор может изменить и начальную страницу, и главное меню индивидуально для каждого пользователя системы, и может адаптировать OpenERP для каждой роли в компании, чтобы лучше соответствовать потребностям каждого.
Чтобы внести изменения для конкретного пользователя, измените установленную для пользователя конфигурацию еще раз через меню [Администрирование ‣ Пользователи ‣ Пользователи] (Administration ‣ Users ‣ Users). Откройте форму для этого пользователя, и выберите различные пункты меню для двух полей Начальное действие (Home Action) и Действие меню (Menu Action).
The Home Action is the menu item that is automatically opened when you first sign on, and is also reached when you click the Home link in the top right toolbar of the web client. There you can choose any page that you would reach through any menu – one of the dashboards could be most useful. The Menu Action is the one you reach through the menu Form ‣ Menu in the GTK client. You can choose the main menu and the dashboards there.
Actions on the Administrator's Menu
It is very easy to change the welcome page and the menu of the different users. However, you should not change the main administrator's menu because you could make certain menus completely inaccessible by mistake.
Assigning Default Values to Fields¶
You can quite easily configure the system to put default values in various fields as you open new forms. This enables you to pre-complete the fields with default data to simplify your users' work in entering new documents. Let us use the Customer form to demonstrate this feature. Create a new customer with Country set as New Zealand
If you are using the web client, click the small button at the right of the Country field.
If you are using the GTK client, you just need to right-click the mouse while the pointer is in the field.
Select Set as default from the pop-up menu. An administrator has the choice of making the default work just for that user, or for all users of the database.
To check this new configuration, open a new partner form: the field Country should now contain the entry New Zealand .
This is a very powerful feature! An administrator can use this functionality to redefine the behavior of your whole system. You can test that in database openerp_ch13 by opening up a new Purchase Order form, clicking the second tab Delivery & Invoicing, selecting From Picking in the Invoicing Control field and then making that the default.
From that moment on, you would automatically create draft purchase invoices only when goods are received, so you could very easily restrict your accountants from paying any invoices that turn up until you were sure you had received the goods. It would not stop anyone from selecting another method of invoice control, but they would start with the default definition.
Changing the Terminology¶
You can use OpenERP's language translation functionality to substitute its standard terminology with terminology that fits your company better. It is quite straightforward to adapt the software with different terms specific to your industry. Moreover, this can strengthen acceptance of your new OpenERP system, because everybody will be able to retain their usual vocabulary.
Вы можете сделать это одним из двух способов:
перевести термины в отдельном файле CSV, что даст вам возможность глобального обзора всех терминов системы, так что вы сможете производить поиск и замену везде,
translate the phrases directly in the client, which means that you can change them in their context, and that can be helpful to you while you are translating.
The same approach is used to translate terms that have not been created yet. This can be useful, for example, with modules that have not yet been translated into English or any other language that you want.
Translation through a CSV File¶
To translate or modify all of the system's phrases, you first have to export a translation file in CSV form. And to do that, you have to install a language into OpenERP. To load a translation that already exists in OpenERP, use Administration ‣ Translations ‣ Load an Official Translation, choose a language and then click Load.
Then export it using Administration ‣ Translations ‣ Import/Export ‣ Export Translation. Select the language, then the CSV File format, then one or more (or all) modules. Click Export to start the export process, then click the small Save As icon to save the file somewhere.
The CSV file is encoded in the UTF-8 format. Make sure that you retain this format when you open the file in a spreadsheet program, because if you do not retain it, you risk seeing strange character strings in place of accented characters.
Файл содержит шесть столбцов: module, type, name, res_id, src, и value. Вам надо обеспечить, чтобы первая строка, которая содержит эти названия столбцов, осталась нетронутой.
The src field contains the base text in English, and the value field contains a translation into another conventional language or into a specialist technical phrase. If there is nothing at all in the value field then the English translation will automatically be used on the form you see.
Where Should you Modify the Text?
Most of the time, you will find the text that you want to modify in several lines of the CSV file. Which line should you modify? Refer to the two columns type (in column B) and name (in column C). Some lines have the name ir.ui.menu in the name column, which shows that this is a menu entry. Others have selection in the type column, which indicates that you would see this entry in a drop-down menu.
You should then load the new file into your OpenERP system using the menu Administration ‣ Translations ‣ Import/Export ‣ Import Translation. You have then got two ways forward:
you can overwrite the previous translation by using the same name as before (so you could have a special 'standard French' translation by reusing the Name Français and Code fr_FR ),
вы можете создать новый файл перевода, который пользователи могут выбрать в своем поле Предпочтения (Preferences).
If you are not connected to the translated language, click Edit Preferences, select the language in Language from the Preferences tab, and finally click Save to load the new language with its new terminology.
You can load a selection of the lines in a translation file by deleting most of the lines in the file and then loading back only the changed ones. OpenERP then changes only the uploaded lines and leaves the original ones alone.
Changes through the Client Interface¶
You can also change labels and other screen items on screen in the web client. To do that, open the form that you want to translate, then click the Translate icon to its bottom right. You then have the choice of translating:
данные в системе (содержащиеся в Поля (Fields)),
метки полей (Метки (Labels)),
все кнопки Действие (Action) в правой части формы (вариант Относится (Relates)),
используемые в форме термины Вид (View).
Вы можете изменить любое из перечисленного.
При использовании клиента GTK процедура немного отличается. В этом случае вы просто нажимаете правую кнопку мыши на метки или кнопке. Вы можете выбрать, перевести ли сам элемент или весь вид.
This method is simple and quick when you only have a few entries to modify, but it can become tiresome and you can lose a lot of time if you have got to change some terms across the whole system.
В этом случае будет лучше использовать способ перевода с фалом CSV.
Taking account of Translations
In the GTK client, the modified terms are not updated immediately. To see the effects of the modifications, you must close the current window and then reopen the form.