mis builder documentation

65
MIS Builder Documentation Release 3.2 Odoo Community Association (OCA) Oct 17, 2021

Upload: others

Post on 10-Feb-2022

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MIS Builder Documentation

MIS Builder DocumentationRelease 3.2

Odoo Community Association (OCA)

Oct 17, 2021

Page 2: MIS Builder Documentation
Page 3: MIS Builder Documentation

Contents:

1 Introduction 31.1 What is MIS Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Modules information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 About this documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Quick Start 5

3 Install the module in Odoo 73.1 Using git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Using pip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 Fresh install with Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Usage 114.1 Access Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 Distinction between Templates and Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2.1 MIS Report Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2.2 MIS Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.3 Quick start: building a simple P&L report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3.1 Create a Template Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3.2 Use the Template to create a new Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.4 Instances example, column types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5 Displaying reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.6 KPI or Accounting Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.6.1 Building your KPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.6.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.7 Expansion of Account Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.8 Python expressions basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.8.1 Arithmetic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.8.2 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.9 Zero vs no data, AccountingNone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.10 Reporting on non-accounting data (queries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.11 Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.12 Analytic Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.13 Data sources for columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.14 MIS Budgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.14.1 Create a new budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.14.2 Fill in your Budget items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

i

Page 4: MIS Builder Documentation

4.15 Sub KPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.16 Building your own reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.16.1 Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5 Developer’s notes 475.1 mis_builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6 Known issues / Roadmap 49

7 Authors and Contributors 517.1 Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.2 mis_builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.3 mis_builder_budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.4 mis_builder_demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.5 Maintainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

8 History 538.1 mis_builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

8.1.1 10.0.3.6.4 (2021-04-23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.1.2 10.0.3.6.3 (2020-11-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.1.3 10.0.3.6.2 (2020-08-28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.1.4 10.0.3.6.1 (2020-04-21) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.1.5 10.0.3.6.0 (2020-03-28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548.1.6 10.0.3.5.0 (2019-10-26) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548.1.7 10.0.3.4.0 (2019-07-09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548.1.8 10.0.3.3.0 (2018-11-16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558.1.9 10.0.3.2.2 (2018-06-30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558.1.10 10.0.3.2.1 (2018-05-29) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558.1.11 10.0.3.2.0 (2018-05-02) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558.1.12 10.0.3.1.1 (2017-11-14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568.1.13 10.0.3.0.4 (2017-10-14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568.1.14 10.0.3.0.3 (2017-10-03) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568.1.15 10.0.3.0.2 (2017-10-01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568.1.16 10.0.2.0.3 (unreleased) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578.1.17 9.0.2.0.2 (2016-09-27) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578.1.18 9.0.2.0.1 (2016-05-26) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588.1.19 9.0.2.0.0 (2016-05-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588.1.20 8.0.1.0.0 (2016-04-27) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588.1.21 8.0.0.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

8.2 mis_builder_budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2.1 10.0.3.5.0 (2020-03-28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2.2 10.0.3.4.0 (2019-10-26) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2.3 10.0.3.3.0 (2018-11-16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2.4 10.0.3.2.1 (2018-06-30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2.5 10.0.3.2.0 (2018-05-02) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608.2.6 10.0.3.1.0 (2017-11-14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608.2.7 10.0.1.1.1 (2017-10-01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

9 Indices and tables 61

ii

Page 5: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Management Information System reports for Odoo: easily build super fast, beautiful, custom reports such as P&L,Balance Sheets and more.

Contents: 1

Page 6: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

2 Contents:

Page 7: MIS Builder Documentation

CHAPTER 1

Introduction

1.1 What is MIS Builder

MIS Builder is an Odoo module that implements a class of Odoo reports where KPI (Key Performance Indicators) aredisplayed in rows, and time periods in columns. It focuses on very fast reporting on accounting data but can also usedata from any other Odoo model.

It features the following key characteristics:

• User-friendly configuration: end users can create new report templates without development, using simpleExcel-like formulas.

• Very fast balance reporting for accounting data, even on million-line databases with very complex accountcharts.

• Reusability: Use the same template for different reports.

• Multi-period comparisons: Compare data over different time periods.

• User-configurable styles: perfectly rendered in the UI as well as in Excel and PDF exports.

• Interactive display with drill-down.

• WYSIWYG Export to PDF and Excel.

• A budgeting module.

• KPI Evaluation over various data sources, such as actuals, simulation, committed costs (custom developmentsare required to create the data source).

• Easy-to-use API for developers for the accounting balance computation engine.

1.2 Modules information

MIS Builder is a set of modules, part of Odoo Business Suite of Applications.

The source code of the modules can be found in the OCA Official Github repository:

3

Page 8: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

The main modules are the following:

• mis_builder module installs the “MIS Reports”, “MIS Reports Styles” and “MIS report Template” menu. Thismodule is the base one and is necessary for any other module.

• mis_builder_budget module installs the “MIS Budget” menu.

• mis_builder_demo module installs the demo data reports in existing MIS (not suitable for production environ-ment).

The repository is licensed under AGPLv3.

MIS Builder is available for the following versions (at the time of this document):

• 8.0,

• 9.0,

• 10.0,

• 11.0

• in both Community and Enterprise Edition.

1.3 About this documentation

This documentation intends to provide the basic knowledge for the user to create financial reports from the standardOdoo financial entries.

The user must have standard knowledge of Odoo usability and functions (Accounting).

No development skills are necessary to use the module but some set up parts requires light technical knowledge.

4 Chapter 1. Introduction

Page 9: MIS Builder Documentation

CHAPTER 2

Quick Start

To configure this module, you need to:

• Go to Accounting > Configuration > MIS Reporting > MIS Report Templates where you can create report tem-plates by defining KPI’s. KPI’s constitute the rows of your reports. Such report templates are time independent.

• Then in Accounting > Reports > MIS Reporting > MIS Reports you can create report instance by binding thetemplates to time periods, hence defining the columns of your reports.

• From the MIS Reports view, you can preview the report, add it to and Odoo dashboard, and export it to PDF orExcel.

5

Page 10: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

6 Chapter 2. Quick Start

Page 11: MIS Builder Documentation

CHAPTER 3

Install the module in Odoo

If you already have an Odoo instance up and running, your preferred way to install addons will work with MIS Builder.

3.1 Using git

The most common way to install the module is to clone the git repository in your server and add the directory to yourodoo.conf:

1. Clone the git repository

cd your-addons-pathgit clone https://github.com/OCA/mis-buildercd mis-buildergit checkout 10.0 #for the version 10.0

2. Update the addon path of odoo.conf

3. Restart Odoo

4. Update the addons list in your database

5. Install the MIS Builder application.

3.2 Using pip

An easy way to install it with all its dependencies is using pip:

1. Recover the code from pip repository

pip install --pre odoo10-addon-mis_builder odoo-autodiscover

2. Restart Odoo

3. Update the addons list in your database

7

Page 12: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4. Install the MIS Builder application.

3.3 Fresh install with Docker

If you do not have any Odoo server installed, you can start your own Odoo in few minutes via Docker in commandline.

Here is the basic how-to (based on https://github.com/Elico-Corp/odoo-docker), valid for Ubuntu OS but could alsoeasily be replicated in MacOS or Windows:

1. Install docker and docker-compose in your system

2. Create the directory structure (assuming the base directory is odoo)

mkdir odoo && cd odoomkdir -p ./volumes/postgres ./volumes/odoo/addons ./volumes/odoo/filestore \./volumes/odoo/sessions

3. Create a docker-compose.yml file in odoo directory with following content:

version: '3.3'services:

postgres:image: postgres:9.5volumes:

- ./volumes/postgres:/var/lib/postgresql/dataenvironment:

- POSTGRES_USER=odoo

odoo:image: elicocorp/odoo:11.0command: startports:

- 127.0.0.1:8069:8069volumes:

- ./volumes/odoo/addons:/opt/odoo/additional_addons- ./volumes/odoo/filestore:/opt/odoo/data/filestore- ./volumes/odoo/sessions:/opt/odoo/data/sessions

links:- postgres:db

environment:- ADDONS_REPO=https://github.com/OCA/mis-builder.git- ODOO_DB_USER=odoo

4. Fire up your container (in odoo directory)

docker-compose up -d odoo

5. Open a web browser and navigate the URL you have set up in your docker-compose.yml file (http://127.0.0.1:8069 in this particular example)

6. Create a new database

7. Update the addons list in your database (Menu Apps > Update Apps List in developer mode)

8. Install the MIS Builder application.

8 Chapter 3. Install the module in Odoo

Page 13: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

9. Improve your Odoo environment (add parameters, change default passwords etc.) under Docker: https://github.com/Elico-Corp/odoo-docker

More about Odoo.

3.3. Fresh install with Docker 9

Page 14: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

10 Chapter 3. Install the module in Odoo

Page 15: MIS Builder Documentation

CHAPTER 4

Usage

4.1 Access Rights

User must be included in the group “Accounting / Advisers” to have access to MIS Builder.

Standard financial MIS Builder menus are located in:

• Accounting > Report > MIS Builder

• Accounting > Report > Configuration > MIS Builder

4.2 Distinction between Templates and Instances

MIS Reports are based on KPI (Sales, Cost, etc.) that needs to be displayed in certain Periods (2018, March, etc.) forcertain Data (Actual, Budget, etc.):

• KPI are defined in the “MIS Report templates”

• Periods are defined in the MIS Reports”

• Actual Data are coming by default from the standard Odoo Accounting Moves

• Budget Data are defined in the “MIS Budgets”

4.2.1 MIS Report Templates

Go to Accounting > Configuration > Financial Reports > MIS Report Templates where you can create report templatesby defining KPI’s. KPI’s constitute the rows of your reports. Such report templates are time independent.

11

Page 16: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.2.2 MIS Report

Then in Accounting > Reporting > MIS Reports you can create report instance by binding the templates to time period,hence defining the columns of your reports.

12 Chapter 4. Usage

Page 17: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.2. Distinction between Templates and Instances 13

Page 18: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.3 Quick start: building a simple P&L report

4.3.1 Create a Template Report

Menu accessible here: Accounting > Configuration > MIS Reporting > MIS Reports Template

Templates are the base of the reports, defining the KPI structure and calculation between the elements. They can befound in:

How to create a template

1. Provide a Description (Name is automatically proposed but can be amended)

2. Value type (Numeric, percentage or string)

3. Comparison Method (Percentage, difference, none)

4. Style: as defined in the Reports Style

5. Style expression: An expression that returns a style depending on the KPI value. Such style is applied on top ofthe row style. Example of syntax: “Style_to_be_used” if name>0 else None

6. Budgetable (if MIS_Budget module is installed): indicates that a budget can be provided for the KPI (not neededfor calculations)

7. Multi: If True allows to define KPI with multiple values (eg: Initial, Debit, Credit, Ending) using Sub-KPI

8. Expression: calculation for the KPI (see below)

9. Display details by account: If set to true will display account details

10. Style for account detail rows: specific style applied to the detailed accounts.

Adding KPI to the current report

KPI are the different element that constitutes the template:

14 Chapter 4. Usage

Page 19: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

KPI details:

4.3. Quick start: building a simple P&L report 15

Page 20: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

16 Chapter 4. Usage

Page 21: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.3.2 Use the Template to create a new Report

Menu accessible here: Accounting > Reports > MIS Reporting > MIS Reports

Once templates are created, you can use them to display the data for specific series and dates in order to display thedata, compare them and calculate additional series:

You can create a new report with different series based on the selected template.

4.3. Quick start: building a simple P&L report 17

Page 22: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

18 Chapter 4. Usage

Page 23: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Create a report

1. Provide a Name

2. Select the Template

3. Select the currency

4. Comparison mode: set to true if you wish to be able to compare data from different series or dates.

5. Set your filters: Posted entries or not

6. Base date: important for relative date reports (today by default)

7. Add Columns to your report (if comparison is True)

4.3. Quick start: building a simple P&L report 19

Page 24: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

20 Chapter 4. Usage

Page 25: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Create a new column in the report

1. Set the label to appear on top of the column as title

2. Select sub-KPI filter if necessary

3. Select the source of the data:

• Actual: use data from accounting move lines.

• Actual (Alternative): Use a custom-made series (not accounting moves) with at least following fields:initial, debit, credit, ending, dates

• Sum Columns: Creates a new column sum of others existing in the report

• Compare Columns: Creates a comparison (percentage) of 2 existing columns

• MIS Budget (If budget installed): Use Budget Series

4. Dates Mode:

• Fixed Dates: simply provide the fixed range

• Relative to report base date: allows to select the period compared with base report date.

– Offset = -1 means previous month.

– Duration = 2 means 2 months from the start of the period

4.4 Instances example, column types

Todo: content waiting contribution

4.5 Displaying reports

Menu accessible here: Accounting > Reports > MIS Reports > MIS Reports

Reports can be displayed from the tree or the Form view:

4.4. Instances example, column types 21

Page 26: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

They can either be (in order of the button):

• Displayed directly in the web interface

22 Chapter 4. Usage

Page 27: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• Exported as PDF file

• Exported as Excel File

• Added to a standard Odoo Dashboard

Note: When the report is displayed in the web interface user can click on any figure and drill down to the underlyingdata.

4.6 KPI or Accounting Expressions

4.6.1 Building your KPI

Expressions can be any valid python expressions.

The following special elements are recognized in the expressions to compute accounting data:{bal|crd|deb}{pieu}[account selector][journal items domain].

• bal, crd, deb: balance, debit, credit.

• p, i, e: respectively variation over the period, initial balance, ending balance

• The account selector is a like expression on the account code (eg 70%, etc).

• The journal items domain is an Odoo domain filter on journal items.

• balu[]: (u for unallocated) is a special expression that shows the unallocated profit/loss of previous fiscal years.

• Expression can also involve other KPI and query results by name (eg kpi1 + kpi2).

Additionally following variables are available in the evaluation context:

• sum, min, max, len, avg: behave as expected, very similar to the python builtins.

• datetime, datetime, dateutil: the python modules.

• date_from, date_to: beginning and end date of the period.

• AccountingNone: a null value that behaves as 0 in arithmetic operations.

4.6.2 Examples

• bal[70]: variation of the balance of account 70 over the period (it is the same as balp[70].

• bali[70,60]: initial balance of accounts 70 and 60.

• bale[1%]: balance of accounts starting with 1 at end of period.

• crdp[40%]: sum of all credits on accounts starting with 40 during the period.

• debp[55%][(‘journal_id.code’, ‘=’, ‘BNK1’)]: sum of all debits on accounts 55 and journal BNK1 during theperiod.

• balp[(‘user_type_id’, ‘=’, ref(‘account.data_account_type_receivable’).id)][]: variation of the balance of all re-ceivable accounts over the period.

• balp[][(‘tax_line_id.tag_ids’, ‘=’, ref(‘l10n_be.tax_tag_56’).id)]: balance of move lines related to tax grid 56.

4.6. KPI or Accounting Expressions 23

Page 28: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.7 Expansion of Account Detail

Todo: content waiting contribution

4.8 Python expressions basics

4.8.1 Arithmetic Expressions

Todo: content waiting contribution

4.8.2 Conditional Expressions

Todo: content waiting contribution

4.9 Zero vs no data, AccountingNone

Todo: content waiting contribution

4.10 Reporting on non-accounting data (queries)

This section describes the “Queries” tab in the MIS Report definition form. It is used to prepare queries on any Odoomodel that has at least a date-like field, and use the result in expression.

Note: See also the Data sources for columns section to report on views that are similar to journal entries, suchcommitted purchases.

Example of query: we want a report showing the Total amount (Excluding VAT) of all sales order confirmed duringthe current month and the previous month.

To create a query, first populate the Queries tab.

Name Select a name (it must be a compatible with a python variable name, so no space in the name for instance, useonly ascii letters, digits and underscore, and start with a letter)

Model Look for the model on which you want to do the report. For example : Sale Order

Field to fetch Select in the list the field from the Model that will be used in the report. For example: Untaxed Amount

Fetched fields name This will show the name of the field to use in the KPI expression later on. For example:amount_untaxed

24 Chapter 4. Usage

Page 29: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Aggregate Choose between nothing, Sum, Max, Average or Min. If you leave this aggregate field empty, the querywill give a list, not a number.

Date field Choose a date field available on the Model. This date is used to get the records that matched the periodmentioned in the query. For example: confirmation date of the sale order.

Domain This is optional. Use a domain (as definded in classic Odoo), to filter records. For example: [(“part-ner_id.country_id.code”,”=”,”US”)]

In the KPI expression, you can now use the fields of the queries. For example: sum([s.amount_untaxed fors in sales_order_amount]) in case the Aggregate field was not set, or s.amount_untaxed in case theAggregate field was set.

4.10. Reporting on non-accounting data (queries) 25

Page 30: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

In a reporting instance, the result is as follows:

26 Chapter 4. Usage

Page 31: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.11 Styles

Menu accessible here: Accounting > Configuration > MIS Reporting > MIS Reports Style

You can create multi-level styles which will be applied to the different lines of reporting:

4.11. Styles 27

Page 32: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

28 Chapter 4. Usage

Page 33: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

The styles are used later in the Template Report definition.

Todo: Add a line for each of the options, although they are quite straightforward.

4.12 Analytic Filters

Analytic accounts is often used in budget and actual versions to follow-up the costs and expenses of a project.

If you need to activate the management of analytic accounts, go to Invoicing module → Configuration → Settings andenable the Analytic Accounting.

In each MIS report, you can untick the box to get the analytic filters. The selection possible is one only.

The other possibility is to add the analytic filter in the MIS report without any selection possible by the user of thereport.

4.12. Analytic Filters 29

Page 34: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.13 Data sources for columns

• Actuals

• Actuals (alternative): Check the module mis_builder_demo to see how to create specific series of data forCommitted purchases not yet invoiced.

• Sum/Difference

• MIS Budgets

Todo: content waiting contribution

4.14 MIS Budgets

Menu accessible here: Accounting > Reports > MIS Reports > MIS Budget

This module lets you create budgets for any MIS report. Several budgets can be created for a given report template (ieone budget per year). Budget figures are provided at the KPI level, with different time periods. A budget can then beselected as a data source for a MIS report column, and the report will show the budgeted values for each KPI, adjustedfor the period of the column.

30 Chapter 4. Usage

Page 35: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

To use this module, you first need to flag at least one KPI in a MIS Report to be budgetable. You also need to configurethe accumulation method on the KPI according to their type.

The accumulation method determines how budgeted values spanning over a time period are transformed to match thereporting period.

• Sum: values of shorter period are added, values of longest or partially overlapping periods are adjusted pro-ratatemporis (eg monetary amount such as revenue).

• Average: values of included period are averaged with a pro-rata temporis weight. Typically used for values thatdo not accumulate over time (eg a number of employees).

When KPI are configured, you need to:

1. Create a budget, then

2. Click on the budget items button to create or import the budgeted amounts for all your KPI and time periods.

4.14. MIS Budgets 31

Page 36: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

3. Finally, a column (aka period) must be added to a MIS report instance, selecting your newly created budget as adata source.

4. The data will be adjusted to the reporting period when displayed.

5. Columns can be compared by adding a column of type “comparison” or “sum”.

4.14.1 Create a new budget

A budget is linked to a set of KPI created in the Report Template. A budget must be defined for a specific period (yearor month)

32 Chapter 4. Usage

Page 37: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

1. Provide a Name and Description

2. Provide the Template it applies to

3. Provide the date range. This is important because if a year is given, when the report must display 3 months,current figures will be provided prorata temporis.

4. Save and provide the budget Items

4.14.2 Fill in your Budget items

A budget contains “Budget items” (smart button on top right) which are the budget values for a KPI and a specificdata.

1. Select the KPI to be budgeted

2. Select the date range or From/To

3. provide Amount in Company currency

4. Provide the corresponding Analytic account

Note: To be noted that the budget could be prepared in Excel and easily imported via Odoo Standard Function.

4.15 Sub KPI

Used when the field Multi is set to true for multiple KPI. Thanks to this option, one given KPI can display multiplecolumns (eg: Initial balance, Debit, Credit and Ending Balance).

Example building a trial balance with initial, debit, credit, ending balance over several periods

4.15. Sub KPI 33

Page 38: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

34 Chapter 4. Usage

Page 39: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.15. Sub KPI 35

Page 40: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.16 Building your own reports

The module mis_builder_demo provides multiple example along with the current existing localizations

4.16.1 Localization

Multiple localizations are currently using the MIS Builder module as a base for their standard reporting. Examples ofthe reports can be studied here:

• Belgium

• France

• Luxembourg

• Spain

36 Chapter 4. Usage

Page 41: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Belgium P&L

4.16. Building your own reports 37

Page 42: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

38 Chapter 4. Usage

Page 43: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Belgium Balance Sheet

4.16. Building your own reports 39

Page 44: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

40 Chapter 4. Usage

Page 45: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Belgium VAT report

4.16. Building your own reports 41

Page 46: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

42 Chapter 4. Usage

Page 47: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.16. Building your own reports 43

Page 48: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Spain Balance Sheet

44 Chapter 4. Usage

Page 49: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

4.16. Building your own reports 45

Page 50: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

Spain P&L

46 Chapter 4. Usage

Page 51: MIS Builder Documentation

CHAPTER 5

Developer’s notes

5.1 mis_builder

A typical extension is to provide a mechanism to filter reports on analytic dimensions or operational units. To imple-ment this, you can override _get_additional_move_line_filter and _get_additional_filter to further filter move lines orqueries based on a user selection. A typical use case could be to add an analytic account field on mis.report.instance,or even on mis.report.instance.period if you want different columns to show different analytic accounts.

47

Page 52: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

48 Chapter 5. Developer’s notes

Page 53: MIS Builder Documentation

CHAPTER 6

Known issues / Roadmap

The mis_builder roadmap and known issues can be found on GitHub.

49

Page 54: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

50 Chapter 6. Known issues / Roadmap

Page 55: MIS Builder Documentation

CHAPTER 7

Authors and Contributors

7.1 Authors

• ACSONE SA/NV

7.2 mis_builder

• Stéphane Bidoul <[email protected]>

• Laetitia Gangloff <[email protected]>

• Adrien Peiffer <[email protected]>

• Alexis de Lattre <[email protected]>

• Alexandre Fayolle <[email protected]>

• Jordi Ballester <[email protected]>

• Thomas Binsfeld <[email protected]>

• Giovanni Capalbo <[email protected]>

• Marco Calcagni <[email protected]>

• Sébastien Beau <[email protected]>

• Laurent Mignon <[email protected]>

• Luc De Meyer <[email protected]>

• Benjamin Willig <[email protected]>

• Martronic SA <[email protected]>

• nicomacr <[email protected]>

• Juan Jose Scarafia <[email protected]>

51

Page 56: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• Richard deMeester <[email protected]>

• Eric Caudal <[email protected]>

• Andrea Stirpe <[email protected]>

• Maxence Groine <[email protected]>

• Arnaud Pineux <[email protected]>

• Ernesto Tejeda <[email protected]>

• Pedro M. Baeza <[email protected]>

• CorporateHub

– Alexey Pelykh <[email protected]>

7.3 mis_builder_budget

• Stéphane Bidoul <[email protected]>

• Adrien Peiffer <[email protected]>

• Benjamin Willig <[email protected]>

• Artem Kostyuk <[email protected]>

7.4 mis_builder_demo

• Stéphane Bidoul <[email protected]>

• Arnaud Pineux <[email protected]>

7.5 Maintainers

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborativedevelopment of Odoo features and promote its widespread use.

Current maintainer:

This module is part of the OCA/mis-builder project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

52 Chapter 7. Authors and Contributors

Page 57: MIS Builder Documentation

CHAPTER 8

History

8.1 mis_builder

8.1.1 10.0.3.6.4 (2021-04-23)

Bugfixes

• Fix drilldown action name when the account model has been customized. (#350)

8.1.2 10.0.3.6.3 (2020-11-05)

Features

• The drilldown action name displayed on the breadcrumb has been revised. The kpi description and the accountdisplay_name are shown instead of the kpi’s technical definition. (#304)

8.1.3 10.0.3.6.2 (2020-08-28)

Bugfixes

• Fix stack trace when grouping budget by account items in the web client. (#296)

• Having a “Compare columns” added on a KPI with an associated style using a Factor/Divider did lead to thesaid factor being applied on the percentages when exporting to XLSX. (#300)

Misc

• #280

8.1.4 10.0.3.6.1 (2020-04-21)

Bugfixes

53

Page 58: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• Fix TypeError: 'module' object is not iterable when using budgets by account. (#276)

8.1.5 10.0.3.6.0 (2020-03-28)

Features

• Add column-level filters on analytic account and analytic tags. These filters are combined with a AND with thereport-level filters and cannot be modified in the preview. (#138)

• Access to KPI from other reports in KPI expressions, aka subreports. In a report template, one can list named“subreports” (other report templates). When evaluating expressions, you can access KPI’s of subreports with adot-prefix notation. Example: you can define a MIS Report for a “Balance Sheet”, and then have another MISReport “Balance Sheet Ratios” that fetches KPI’s from “Balance Sheet” to create new KPI’s for the ratios (e.g.balance_sheet.current_assets / balance_sheet.total_assets). (#155)

8.1.6 10.0.3.5.0 (2019-10-26)

Features

• The account_id field of the model selected in ‘Move lines source’ in the Period form can now be a Many2onerelationship with any model that has a code field (not only with account.account model). To this end, themodel to be used for Actuals move lines can be configured on the report template. It can be something else thanmove lines and the only constraint is that its account_id field has a code field. (#149)

• Add source_aml_model_name field so extension modules providing alternative data sources can moreeasily customize their data source. (#214)

• Support analytic tag filters in the backend view and preview widget. Selecting several tags in the filter meansfiltering on move lines which have all these tags set. This is to support the most common use case of using tagsfor different dimensions. The filter also makes a AND with the analytic account filter. (#228)

• Display company in account details rows in multi-company mode. (#242)

Bugfixes

• In columns of type Sum, preserve styles for KPIs that are not summable (eg percentage values). Before this fix,such cells were displayed without style. (#219)

• In Excel export, keep the percentage point suffix (pp) instead of replacing it with %. (#220)

8.1.7 10.0.3.4.0 (2019-07-09)

Features

• New year-to-date mode for defining periods. (#165)

• Add support for move lines with negative debit or credit. Used by some for storno accounting. Not officiallysupported. (#175)

• In Excel export, use a number format with thousands separator. The specific separator used depends on theExcel configuration (eg regional settings). (#190)

• Add generation date/time at the end of the XLS export. (#191)

• In presence of Sub KPIs, report more informative user errors when non-multi expressions yield tuples of incor-rect lenght. (#196)

Bugfixes

54 Chapter 8. History

Page 59: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• Fix rendering of percentage types in Excel export. (#192)

8.1.8 10.0.3.3.0 (2018-11-16)

Features

• Analytic account filters. On a report, an analytic account can be selected for filtering. The filter will be appliedto move lines queries. A filter box is also available in the widget to let the user select the analytic account duringreport preview. (#15)

• Control visibility of analytic filter combo box in widget. This is useful to hide the analytic filters on reportswhere they do not make sense, such as balance sheet reports. (#42)

• Display analytic filters in the header of exported pdf and xls. (#44)

• Replace the last old gtk icons with fontawesome icons. (#104)

• Use active_test=False in AEP queries. This is important for reports involving inactive taxes. This should notnegatively effect existing reports, because an accounting report must take into account all existing move lineseven if they reference objects such as taxes, journals, accounts types that have been deactivated since theircreation. (#107)

• int(), float() and round() support for AccountingNone. (#108)

• Allow referencing subkpis by name by writing kpi_x.subkpi_y in expressions. (#114)

• Add an option to control the display of the start/end dates in the column headers. It is disabled by default (thisis a change compared to previous behaviour). (#118)

• Add evaluate method to mis.report. This is a simplified method to evaluate kpis of a report over a time period,without creating a mis.report.instance. (#123)

Bugs

• In the style form, hide the “Hide always” checkbox when “Hide always inherit” is checked, as for all other syleelements. (#121)

Upgrading from 3.2 (breaking changes)

If you use Actuals (alternative) data source in combination with analytic filters, the underlying model mustnow have an analytic_account_id field.

8.1.9 10.0.3.2.2 (2018-06-30)

• [FIX] Fix bug in company_default_get call returning id instead of recordset (#103)

• [IMP] add “hide always” style property to make hidden KPI’s (for KPI that serve as basis for other formulas,but do not need to be displayed). (#46)

8.1.10 10.0.3.2.1 (2018-05-29)

• [FIX] Missing comparison operator for AccountingNone leading to errors in pbal computations (#93)

8.1.11 10.0.3.2.0 (2018-05-02)

• [FIX] make subkpi ordering deterministic (#71)

8.1. mis_builder 55

Page 60: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• [ADD] report instance level option to disable account expansion, enabling the creation of detailed templateswhile deferring the decision of rendering the details or not to the report instance (#74)

• [ADD] pbal and nbal accounting expressions, to sum positive and negative balances respectively (ie ignoringaccounts with negative, resp positive balances) (#86)

8.1.12 10.0.3.1.1 (2017-11-14)

New features:

• [ADD] month and year relative periods, easier to use than date ranges for the most common case. (#2)

• [ADD] multi-company consolidation support, with currency conversion (the conversion rate date is the end ofthe reporting period) (#7, #3)

• [ADD] provide ref, datetime, dateutil, time, user in the evaluation context of move line domains; among otherthings, this allows using references to xml ids (such as account types or tax tags) when querying move lines(#26).

• [ADD] extended account selectors: you can now select accounts using any domain on ac-count.account, not only account codes balp[('user_type_id', '=', ref('account.data_account_type_receivable').id)] (#4).

• [IMP] in the report instance configuration form, the filters are now grouped in a notebook page, this improvesreadability and extensibility (#39).

Bug fixes:

• [FIX] fix error when saving periods in comparison mode on newly created (not yet saved) report instances. #50

• [FIX] improve display of Base Date report instance view. #51

Upgrading from 3.0 (breaking changes):

• Alternative move line data sources must have a company_id field.

8.1.13 10.0.3.0.4 (2017-10-14)

Bug fix:

• [FIX] issue with initial balance rounding. #30

8.1.14 10.0.3.0.3 (2017-10-03)

Bug fix:

• [FIX] fix error saving KPI on newly created reports. #18

8.1.15 10.0.3.0.2 (2017-10-01)

New features:

• [ADD] Alternative move line source per report column. This makes mis buidler accounting expressions work onany model that has debit, credit, account_id and date fields. Provided you can expose, say, committed purchases,or your budget as a view with debit, credit and account_id, this opens up a lot of possibilities

• [ADD] Comparison column source (more flexible than the previous, now deprecated, comparison mechanism).CAVEAT: there is no automated migration to the new mechanism.

56 Chapter 8. History

Page 61: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• [ADD] Sum column source, to create columns that add/subtract other columns.

• [ADD] mis.kpi.data abstract model as a basis for manual KPI values supporting automatic ajustment to thereporting time period (the basis for budget item, but could also server other purposes, such as manually enteringsome KPI values, such as number of employee)

• [ADD] mis_builder_budget module providing a new budget data source

• [ADD] new “hide empty” style property

• [IMP] new AEP method to get accounts involved in an expression (this is useful to find which KPI relate to agiven P&L acount, to implement budget control)

• [IMP] many UI improvements

• [IMP] many code style improvements and some refactoring

• [IMP] add the column date_from, date_to in expression evaluation context, as well as time, datetime and dateutilmodules

Main bug fixes:

• [FIX] deletion of templates and reports (cascade and retricts) (https://github.com/OCA/account-financial-reporting/issues/281)

• [FIX] copy of reports (https://github.com/OCA/account-financial-reporting/issues/282)

• [FIX] better error message when periods have wrong/missing dates (https://github.com/OCA/account-financial-reporting/issues/283)

• [FIX] xlsx export of string types KPI (https://github.com/OCA/account-financial-reporting/issues/285)

• [FIX] sorting of detail by account

• [FIX] computation bug in detail by account when multiple accounting expressions were used in a KPI

• [FIX] permission issue when adding report to dashboard with non admin user

8.1.16 10.0.2.0.3 (unreleased)

• [IMP] more robust behaviour in presence of missing expressions

• [FIX] indent style

• [FIX] local variable ‘ctx’ referenced before assignment when generating reports with no objects

• [IMP] use fontawesome icons

• [MIG] migrate to 10.0

• [FIX] unicode error when exporting to Excel

• [IMP] provide full access to mis builder style for group Adviser.

8.1.17 9.0.2.0.2 (2016-09-27)

• [IMP] Add refresh button in mis report preview.

• [IMP] Widget code changes to allow to add fields in the widget more easily.

8.1. mis_builder 57

Page 62: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

8.1.18 9.0.2.0.1 (2016-05-26)

• [IMP] remove unused argument in declare_and_compute_period() for a cleaner API. This is a breaking APIchanging merged in urgency before it is used by other modules.

8.1.19 9.0.2.0.0 (2016-05-24)

Part of the work for this release has been done at the Sorrento sprint April 26-29, 2016. The rest (ie a major refactoring)has been done in the weeks after.

• [IMP] hide button box in edit mode on the report instance settings form

• [FIX] Fix sum aggregation of non-stored fields (https://github.com/OCA/account-financial-reporting/issues/178)

• [IMP] There is now a default style at the report level

• [CHG] Number display properties (rounding, prefix, suffix, factor) are now defined in styles

• [CHG] Percentage difference are rounded to 1 digit instead of the kpi’s rounding, as the KPI rounding does notmake sense in this case

• [CHG] The divider suffix (k, M, etc) is not inserted automatically anymore because it is inconsistent whenworking with prefixes; you need to add it manually in the suffix

• [IMP] AccountingExpressionProcessor now supports ‘balu’ expressions to obtain the unallocated profit/loss ofprevious fiscal years; get_unallocated_pl is the corresponding convenience method

• [IMP] AccountingExpressionProcessor now has easy methods to obtain balances by account:get_balances_initial, get_balances_end, get_balances_variation

• [IMP] there is now an auto-expand feature to automatically display a detail by account for selected kpis

• [IMP] the kpi and period lists are now manipulated through forms instead of directly in the tree views

• [IMP] it is now possible to create a report through a wizard, such reports are deemed temporary and availablethrough a “Last Reports Generated” menu, they are garbaged collected automatically, unless saved permanently,which can be done using a Save button

• [IMP] there is now a beginner mode to configure simple reports with only one period

• [IMP] it is now easier to configure periods with fixed start/end dates

• [IMP] the new sub-kpi mechanism allows the creation of columns with multiple values, or columns with differentvalues

• [IMP] thanks to the new style model, the Excel export is now styled

• [IMP] a new style model is now used to centralize style configuration

• [FIX] use =like instead of like to search for accounts, because the % are added by the user in the expressions

• [FIX] Correctly compute the initial balance of income and expense account based on the start of the fiscal year

• [IMP] Support date ranges (from OCA/server-tools/date_range) as a more flexible alternative to fiscal periods

• v9 migration: fiscal periods are removed, account charts are removed, consolidation accounts have been removed

8.1.20 8.0.1.0.0 (2016-04-27)

• The copy of a MIS Report Instance now copies period. https://github.com/OCA/account-financial-reporting/pull/181

58 Chapter 8. History

Page 63: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

• The copy of a MIS Report Template now copies KPIs and queries. https://github.com/OCA/account-financial-reporting/pull/177

• Usability: the default view for MIS Report instances is now the rendered preview, and the settings areaccessible through a gear icon in the list view and a button in the preview. https://github.com/OCA/account-financial-reporting/pull/170

• Display blank cells instead of 0.0 when there is no data. https://github.com/OCA/account-financial-reporting/pull/169

• Usability: better layout of the MIS Report periods settings on small screens. https://github.com/OCA/account-financial-reporting/pull/167

• Include the download buttons inside the MIS Builder widget, and refactor the widget to open the door to analyticfiltering in the previews. https://github.com/OCA/account-financial-reporting/pull/151

• Add KPI rendering prefixes (so you can print $ in front of the value). https://github.com/OCA/account-financial-reporting/pull/158

• Add hooks for analytic filtering. https://github.com/OCA/account-financial-reporting/pull/128 https://github.com/OCA/account-financial-reporting/pull/131

8.1.21 8.0.0.2.0

Pre-history. Or rather, you need to look at the git log.

8.2 mis_builder_budget

8.2.1 10.0.3.5.0 (2020-03-28)

Features

• Budget by GL account: allow budgeting by GL account in addition to the existing mechanism to budget by KPI.Budget items have a begin and end date, and when reporting a pro-rata temporis adjustment is made to matchthe reporting period. (#259)

8.2.2 10.0.3.4.0 (2019-10-26)

Bugfixes

• Consider analytic tags too when detecting overlapping budget items. Previously only analytic account wasconsidered, and this overlap detection mechanism was overlooked when analytic tags were added to budgetitems. (#241)

8.2.3 10.0.3.3.0 (2018-11-16)

Features

• Support analytic filters. (#15)

8.2.4 10.0.3.2.1 (2018-06-30)

• [IMP] Support analytic tags in budget items (#100)

8.2. mis_builder_budget 59

Page 64: MIS Builder Documentation

MIS Builder Documentation, Release 3.2

8.2.5 10.0.3.2.0 (2018-05-02)

• [FIX] #NAME error in out-of-order computation of non budgetable items in budget columns (#68)

8.2.6 10.0.3.1.0 (2017-11-14)

New features:

• [ADD] multi-company record rule for MIS Budgets (#27)

8.2.7 10.0.1.1.1 (2017-10-01)

First version.

60 Chapter 8. History

Page 65: MIS Builder Documentation

CHAPTER 9

Indices and tables

• genindex

• modindex

• search

61