This is the documentation for older versions of Odoo (formerly OpenERP).

See the new Odoo user documentation.

See the new Odoo technical documentation.

Configuring the menu

Open ERP's menu organization isn't 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

As administrator, and using the web client, select a menu item (but don't click it). Click on the line containing Administration ‣ Translations ‣ Import/Export ‣ Export a Translation File (but not on the string Export a Translation File itself) and click the Switch button to bring up the menu item as an editable form (you can do the same using the GTK client – there you select the line and click the View button instead).

You could now edit this form (but don't 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's 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 click Main Menu to see the results.

小技巧

Duplicating the menu

If you're planning to modify a menu you should duplicate it first. In this way you'll always keep a link to the original menu that works if you need it to.

Personalizing the welcome page for each user

When you sign into Open ERP for the first time, a welcome page appears. In a minimal system, such as that created in the original openerp_ch02 database before it was expanded in OpenERP 漫游指南, and in the openerp_ch03 database, you only get the main menu – the same as you get by default when you click the Main Menu button. As you add functionality to your database you get more choices for the welcome page, with different dashboards automatically assigned to various company roles as they're created in the demonstration data.

管理员能为每个用户设置欢迎页面和主菜单,以满足不同角色的需求.

使用 设置 ‣ 用户 ‣ 用户 为特定用户修改设置.打开特定用户的表单, 为 主页动作菜单动作 字段选择不同的菜单项目。

/doc_static/5.0/_images/new_home.png

选择一个新的欢迎页

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'd reach through any menu – one of the dashboards could be most useful. The Menu Action is the one you reach through the Main Menu button in the web client (the Menu button in the GTK client). You can choose the main menu and the dashboards there.

小技巧

Actions on the administrator's menu

It's very easy to change the welcome page and the menu of the different users. However, you shouldn't 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.

  • If you're using the web client hold Ctrl down and Right-Click at the same time (that's a mouse right-click while the mouse pointer is in the field and the Control key is held down on the keyboard).

  • If you're using the GTK client, you just need to right-click the mouse while the pointer is in the field.

An administrator has the choice of making the default work just for that user, or for all users of the database.

/doc_static/5.0/_images/set_default.png

插入一个新的默认值

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 Purchase Shippings, selecting From Picking in the Invoicing Control field and then making that the default.

From that moment on, you'd 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 wouldn't stop anyone from selecting another method of invoice control, but they'd start with the default definition.

Changing the terminology

You can use Open ERP's language translation functionality to substitute its standard terminology with terminology that fits your company better. It's quite straightforward to adapt the software with different terms specific to your industry. Moreover, this can strengthen acceptance of your new Open ERP 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're translating.

The same approach is used to translate terms that haven't been created yet. This can be useful, for example, with modules that haven't 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 Start Installation.

Then export it using Administration ‣ Translations ‣ Import/Export ‣ Export a Translation file. Select the language, then the :guilabel:`CSV File format, then one or more (or all) modules. Click Get File to start the download process, then click the small Save icon to save the file somewhere. A French translation would be named fr_FR.csv by default, but you can name it whatever you like.

注解

UTF-8 format

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 don't retain it you risk seeing strange character strings in place of accented characters.

/doc_static/5.0/_images/csv_transl.png

在CSV文件的翻译视图

这个文件包含了6列:: module , type , name, res_id, src, and 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's nothing at all in the value field then the English translation will automatically be used on the 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'd see this entry in a drop-down menu.

You should then load the new file into your Open ERP system using the menu Administration ‣ Translations ‣ Import/Export ‣ Import a Translation file. You've 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 ),

  • 你能创建一个新的翻译文件,用户可以在“用户喜好”中选择。

If you're not connected to the translated language, click Preferences, select the language in Language and finally click OK to load the new language with its new terminology.

小技巧

Partial translations

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. Open ERP 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 this resource. icon to its top right. You then have the choice of translating:

  • 系统中的数据(包含在 字段 里)

  • 字段标题 ( 标签),

  • 表单右侧所有的 动作 按钮( 关联 的选项)

  • 在表单 视图 中的术语。

你能修改这些中任意一项。

使用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've got to change some terms across the whole system.

这种情况下,更好的方法就是采用CSV文件的翻译方法。

小技巧

Tacking account of translations

In the GTK client the modified terms aren't updated immediately. To see the effects of the modifications you must close the current window and then reopen the form.