Navigation |
Creating a Configuration Module
Enter search terms or a module, class or function name.
Retail and Industrial Management, steps towards Sales, Logistics and Manufacturing Integration in the Open Source & Management Collection. |
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.
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.
Tip
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.
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 Guided Tour, 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.
The administrator can change both the welcome page and the main menu page individually for each user of the system, and can adapt Open ERP to each role in the company to best fit the needs of everyone.
To make modifications for a particular user, edit the user configuration again in Administration ‣ Users ‣ Users. Open the form for a particular user, and select different menu entries for the two fields Home Action and 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’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.
Tip
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.
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.
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 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.
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.
You can do this one of two ways:
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.
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 Open ERP. To load a translation that already exists in Open ERP 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.
Note
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.
The file contains six columns: module , type , name, res_id, src, and value. You have to ensure that the first line, which specifies these column names, remains untouched.
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.
Tip
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:
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.
Tip
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.
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:
You can modify any of these.
The procedure is slightly different using the GTK client. In this you just right-click on a label or button with the mouse. You can choose to translate the item itself or the whole view.
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.
In that case it would be better to use the translation method that employs a CSV file.
Tip
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.
Creating a Configuration Module
Enter search terms or a module, class or function name.
Retail and Industrial Management, steps towards Sales, Logistics and Manufacturing Integration in the Open Source & Management Collection. |

