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

See the new Odoo user documentation.

See the new Odoo technical documentation.

Configuring Reports

OpenERP has two distinct report types:

  • Statistical reports: these are calculated data, often represented in the form of lists or graphs. These reports are dynamic, and you can navigate through the data that comprise the figures through the client interface.

  • Report documents: they are used to print system documents. The result is usually a PDF generated by a selection made on the screen. Furthermore, OpenERP enables you to open these reports in OpenOffice.org to edit in any changes you want before sending them to your customer.

Because of the power of the OpenERP engine, these two types of report can be created or modified without needing any development, and this can be done directly in the client interface of OpenERP or from OpenOffice.org.

Managing Statistical Reports

Many reports are configured in advance in OpenERP. You can find them in the Reporting sub-menus under each main menu entry.

Modelling a New Report

OpenERP gives you the possibility of developing your own analyses to meet your specific needs. To define a new analysis of the system's data, you should install the module base_report_creator. You can do so by using the Reconfigure wizard and installing Advanced Reporting. Then as you configure the reporting tools, select Query Builder for installation. This enables you to create complex queries on the database, in a simple and visual way.

Once the module is installed, create a new report using the menu Administration ‣ Customization ‣ Reporting ‣ Custom Reports.

Give a Report Name to your new report and select the objects that you are going to analyse. For example, select the project.vs.hours object (you have to install Project Management for this).

Then turn to the second tab View parameters to select the views that you want in your report. Select Tree in the First View and Graph in the Second View. You can choose the type of graph displayed using the Graph View fields. You could also select Calendar as a view if you were going to add a date field to your report.

/doc_static/6.0/_images/report_analysis_config.png

Fields selected for the project analysis

In the third tab Fields to Display you must indicate which of the fields in the list you want to be shown in your report. Complete the screen along the lines of the figure above.

  1. Последовательность (Sequence) -- задает порядок вывода полей.

  2. Field, the second column, enables you to select a field from any of the objects you selected in the first tab.

  3. Grouping Method, the third column lets you to determine the grouping operation that is to be applied to this field:

    • Grouped : Enables you to group document entries with the same value in this field.

    • Сумма (Sum) : Дает сумму значений в данном поле.

    • Минимум (Minimum) : Дает минимальное из всех значений, встречающихся в данном поле.

    • Максимум (Maximum) : Дает максимальное из всех значений, встречающихся в данном поле.

    • Среднее (Average) : Дает среднее арифметическое всех значений в данном поле.

    • Счетчик (Count) : Дает количество всех значений данного поля.

  4. Graph Mode, the fourth column, determines if the field will appear in the graph view and, if so, on which axis (X or Y).

  5. Calendar Mode, the fifth column, enables you to specify if the field can be the basis of a calendar view.

In the fourth tab Filters on Fields, you can add filters on all the fields of the selected objects. To do that, use the button Add filter at the top of this tab. For the moment, do not add a filter.

You can now Save the report you defined. Click on the Open Report button to the right of the form on the General Configuration tab to get the requested analysis.

/doc_static/6.0/_images/report_project_tree.png

Analysing task by project in tree view

/doc_static/6.0/_images/report_project_graph.png

Analysing task by project in graph view

Configuring the Dashboards

A dashboard is a selection of reports previously defined in OpenERP. You can choose from hundreds of predefined reports and, for each report, indicate its position on the dashboard.

Также, как и поля в отчетах, поле Последовательность (Sequence) определяет порядок, который используется при выводе видов на панель.

/doc_static/6.0/_images/dashboard_config.png

Определение новой панели аналитики

Once the dashboard has been defined through the menu Administration ‣ Customization ‣ Reporting ‣ Dashboard Definition, you can use the Create Menu button to create a menu entry for your dashboard anywhere in the menu system.

Managing Document Templates with OpenOffice.org

To configure your printable documents in OpenERP, use the module base_report_designer. To install this module use the Reconfigure wizard and ensuring that Advanced Reporting is installed, configure OpenOffice Report Designer for installation.

Совет

The OpenOffice.org Writer Plug-in

You can create your own reports in just a few minutes using the OpenOffice.org Writer plug-in. This tool can give your team a big productivity improvement. Using it, you can create templates for all of your company's documents, reducing the work of creating and laying out data and customer documents.

The system is both simple and powerful, because it gives you the benefits of all of the layout facilities offered by OpenOffice.org Writer, as well as all of the data and calculation provided by OpenERP. You could create or modify reports directly from OpenOffice.org and then use them in OpenERP.

Примечание

Независимость от OpenOffice.org

OpenOffice.org используется только для создания новых шаблонов документов. Только системному администратору нужно устанавливать OpenOffice.org.

Once the document templates have been defined, the users do not need it to carry out their normal work. They can use either Microsoft Office or OpenOffice.org as they choose.

The OpenOffice.org plug-in enables you to search for fields in OpenERP and integrate them into your document templates. You can use data loops in tables or sections, enabling you to attach several lines to an order, for example.

Once the new report has been defined, it appears directly in the OpenERP client for the system users.

Существуют два режима использования отчетов:

  • создать при помощи отчета документ PDF с данными в нем, отражающими выбранную запись (например, счет).

  • открыть при помощи отчета документ, данные которого отражают выбранную запись, для редактирования в OpenOffice.org. Это дает вам возможность отредактировать документ в OpenOffice.org перед отправкой клиенту (например, предложение).

The personalized reports are stored in the OpenERP database and are accessible to everyone who has rights to use your database without any need for the installation of OpenOffice.org on their own computers. The document modifications are applied to a single database.

Installing the OpenOffice.org Module

Вам необходимо установить два компонента до использования редактора отчетов:

  • the module base_report_designer – first in your OpenERP installation if it is not already there, and then in the OpenERP database, you want to use it in.

  • Дизайнер отчетов OpenOffice.org (OpenOffice.org Report Designer) в установленный на компьютер администратора вашей системы OpenOffice.org.

You start by installing the module base_report_designer just like all the other OpenERP modules.

To install the OpenOffice.org extension, save the file openerp_report_designer.zip supplied during the OpenERP Report Designer Configuration. Check that OpenOffice.org is properly installed on your computer and that you have administration rights for installation.

/doc_static/6.0/_images/tinyreport.png

Меню отчетов OpenERP в OpenOffice.org Writer

Start OpenOffice.org Writer, select Tools ‣ Extension Manager... to open the Extension Manager dialog box, and then search for the openerp_report_designer.zip file to install it. Then close the application and restart Writer: a new menu appears in the top menu bar – OpenERP Report Designer.

Connecting OpenOffice.org to OpenERP

Select OpenERP Report Designer ‣ Server parameters in the top menu of OpenOffice.org Writer. You can then enter your connection parameters to the OpenERP server. You must select a database in which you have already installed the module purchase. A message appears if you have made a successful connection.

Modifying a Report

Редактор отчетов позволяет вам:

  • modify existing reports which will then replace the originals in your OpenERP database,

  • создать новые отчеты для выбранного объекта.

To modify an existing report, select OpenERP Report Designer ‣ Modify Existing Report. Choose the report Purchase Order - Request for Quotation in the Modify Existing Report dialog box, and then click Open Report.

/doc_static/6.0/_images/openoffice_quotation.png

Изменение шаблона документа

Затем OpenOffice.org откроет для вас отчет в режиме внесения изменений. Вы можете изменить его при помощи стандартных функций редактирования текста OpenOffice.org Writer.

The document is modified in its English version. It will be translated as usual by OpenERP's translation system when you use it through the client interface, if you have configured your own setup to translate to another language for you. So you only need to modify the template once, even if your system uses other languages – but you will need to add translations as described earlier in this chapter if you add fields or change the content of the existing ones.

Совет

Older Reports

The older reports may not all have been converted into the new form supported by OpenERP. Data expressions in the old format are shown within double brackets and not in OpenOffice.org fields.

You can transform an old report format to the new format from the OpenOffice.org menu OpenERP Report Designer ‣ Convert Brackets -> Fields.

From the OpenERP toolbar in OpenOffice.org it is possible to:

  • connect to the OpenERP server: by supplying the connection parameters.

  • add a loop: select a related field amongst the available fields from the proposed object, for example Order Lines . When it is printed, this loop will execute for each line of the order. The loop can be put into a table (the lines will then repeat) or into an OpenOffice.org section.

  • add a field: you can then go through the whole OpenERP database from the selected object and then a particular field.

  • добавить выражение: впишите выражение на языке Python для расчета значений на основании любых полей выбранного объекта.

Совет

Выражения Python

Using the Add an expression button, you can enter expressions in the Python language. These expressions can use all of the object's fields for their calculations.

Например, если вы делаете отчет на основе данных заказа, вы можете использовать следующее выражение:

'%.2f' % (amount_total * 0.9,)

In this example, amount_total is a field from the purchase.order object. The result will be 90% of the total of the order, formatted to two decimal places.

You can check the result in OpenERP using the menu Purchases ‣ Purchase Management ‣ Requests for Quotation.

Creating a New Report

The general template is made up of loops (such as the list of selected orders) and fields from the object, which can also be looped. Format them to your requirements, then save the template.

Существующие шаблоны отчетов дают большой набор примеров. Вы можете начать с добавления циклов и нескольких полей для создания минимального шаблона.

When the report has been created, send it to the server by clicking OpenERP Report Designer ‣ Send to the server, which brings up the Send To Server dialog box. A Technical Name for the report is assigned by default, to make it appear beside the other purchase order reports. Rename the template as New Request for Quotation in Report Name, check the checkbox Corporate Header and finally click Send Report to Server.

To send it to the server, you can specify if you prefer OpenERP to produce a PDF when the user prints the document, or if OpenERP should open the document for editing in OpenOffice.org Writer before printing. To do that choose PDF , OpenOffice (SXW) or HTML in the field Select Rpt. Type.

Creating Common Headers for Reports

When saving new reports and reports that you have modified, you are given the option to select a header. This header is a template that creates a standard page header and footer containing data that is defined in each database.

This template can be customized by changing the company information through the menu Administration ‣ Companies ‣ Companies. You may select your parent company from the list and edit the fields Report Header, Report Footer 1, Report Footer 2 in the General Information tab. If your company has a logo that you would want to appear in all reports, you may add it using the Logo field. You can also change the appearance of the header/footer by editing the XML code in the tabs Header/Footer and Internal Header/Footer.

For any kind of troubleshooting problems kindly mail us at cde@tinyerp.com.