Giter Club home page Giter Club logo

mis-builder's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

MIS Builder

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

This project implements a class of reports where KPI (Key Performance Indicators) are displayed in rows, and time periods in columns. It focuses on very fast reporting on accounting data but can also use data from any other Odoo model.

It features the following key characteristics:

  • User configurable: end users can create new report templates without development, using simple Excel-like formulas.
  • Very fast balance reporting for accounting data, even on million lines databases and very complex account charts.
  • Use the same template for different reports.
  • Compare data over different time periods.
  • User-configurable styles, rendered perfectly in the UI as well as Excel and PDF exports.
  • Interactive display with drill-down.
  • Export to PDF and Excel.
  • A budgeting module.
  • Evaluate KPI over various data sources, such as actuals, simulation, committed costs (some custom development is required to create the data source).
  • For developers, the accounting balance computation engine is exposed as an easy to use API.

Here are some presentations:

Available addons

addon version maintainers summary
mis_builder 16.0.5.1.9 sbidoul Build 'Management Information System' Reports and Dashboards
mis_builder_budget 16.0.5.0.3 sbidoul Create budgets for MIS reports
mis_builder_demo 16.0.1.0.3 sbidoul Demo addon for MIS Builder

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


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

mis-builder's People

Contributors

adrianojprado avatar adrienpeiffer avatar apineux avatar badbole avatar benwillig avatar britoederr avatar elicoidal avatar gurneyalex avatar hhgabelgaard avatar ivorra78 avatar jordibforgeflow avatar lepistone avatar lmignon avatar loisrforgeflow avatar maxymoos avatar mileo avatar msdruidoo avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar pedrobaeza avatar primes2h avatar sanrav avatar sbidoul avatar sebastienbeau avatar thomasbinsfeld avatar tv-openbig avatar weblate avatar yankinmax avatar yvaucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mis-builder's Issues

extended account selectors

From @sbidoul on September 3, 2017 13:9

Accounting expressions in mis_builder have the form

(bal|crd|deb)(p|i|e)[account selector]([optional move line domain])?

The account selector is currently based on account codes (eg 70%).

Further account filtering can be added in the move line domain, eg ('account_id.type', '=', ...). But that is slow because additional database queries must be done, whereas the account selector boils down to one read_group per period and move line domain.

So it is desirable to avoid using the move line domains to filter on accounts.

To implement this, the account selector can be extended to support any domain on gl accounts.

Copied from original issue: OCA/account-financial-reporting#345

Filtering positive/negative account balances

Use case

In Spain, we have several sections in the Balance Sheet that includes the sum of balances that are greater than 0 in one side, and the opposite in the other side. They are for example the accounts 551. But the balance is not taken as a whole, but account per account. Example:

  • You have in the account 551001 positive balance: then it should go to one side.
  • You have in the account 551002 negative balance: then i should go to the other side.

So putting the expression (bale[551%] if bale[551%] > 0) doesn't work, and you can't define the expression if a fixed way like (bale[551001] if bale[551001] > 0) + (bale[551002] if bale[551002] > 0) + ... because there are infinite accounts: you have 551001, 551002, but also 5510001, 5510002... (with 7 digits), and so on.

Proposed solution

Add an account expansion mechanism at expression level. This can be an optional fifth letter in the expressions (for example, a). If included, mis_builder will switch the expression before passing it to the "SQL parsing" for making the expansion by account. Example: if you put the expression +(balea[551%] if balea[551%] > 0), it searches on the system the account selector, and unfolds the expression with the result:

+(bale[551000] if bale[551000] > 0)+(bale[551001] if bale[551001] > 0)+(bale[551002] if bale[551002] > 0)

and then continues the normal pipe

I don't know enough yet the mis_builder code, but maybe with a little guidance I can implement it.

[9.0] mis_builder - Tips for performance optimization?

Hi!

I am using plenty of KPI's using syntax like bale[][('account_id.tag_ids.name','=', '14300 Inventory')], but with quite a lot of history this seems to be a performance killer. @sbidoul do you have any recommendation based on your experience? Perhaps a better way to query based on account tags, or perhaps we need to add indices to the DB?

Backport widget code improvements from 11 to 10 and 9

The widget implementation is better in v11

  • the code is cleaner
  • in theory it allows the inclusion of a mis report widget in a form view

This issue is to test if the v11 code works in v10 and v9 (from reading the widget API documentation, it should).

dependency on account_accountant

As reported by @vdewulf : add a dependency of MIS Builder on account_accountant. Otherwise, there is only the configuration of MIS Builder available, not the reports themselves.

[11.0] mis-builder: Using pbal/nbal when there are no values

When using a MIS template that contains pbale expression, if there are no moves in the referred account or accounts, we get this error:

  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 936, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 931, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 923, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report_instance.py", line 690, in compute
    kpi_matrix = self._compute_matrix()
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report_instance.py", line 682, in _compute_matrix
    self._add_column(aep, kpi_matrix, period, period.name, description)
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report_instance.py", line 650, in _add_column
    aep, kpi_matrix, period, label, description)
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report_instance.py", line 607, in _add_column_actuals
    no_auto_expand_accounts=self.no_auto_expand_accounts,
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report.py", line 820, in declare_and_compute_period
    no_auto_expand_accounts)
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report.py", line 656, in _declare_and_compute_col
    eval_expressions(expressions, locals_dict)
  File "/opt/odoo/auto/addons/mis_builder/models/mis_report.py", line 783, in eval_expressions
    replaced_expr = aep.replace_expr(expression)
  File "/opt/odoo/auto/addons/mis_builder/models/aep.py", line 404, in replace_expr
    return self._ACC_RE.sub(f, expr)
  File "/opt/odoo/auto/addons/mis_builder/models/aep.py", line 388, in f
    elif field == 'pbal' and debit >= credit:
TypeError: unorderable types: AccountingNoneType() >= AccountingNoneType()

This is not happening on v10 nor v9, only on v11. My possible solutions would be:

  • Check for AccountNoneType before making the comparison.
  • Implement operators for that case.

monetary type

A monetary kpi type which behaves exactly as the numeric type, except it renders with the proper monetary sign.

date_range not available for version 11 of MIS Builder

Hi There,
I'm wondering if date_range is still needed to have MIS builder installable on v11? It still on the dependency of Mis builder 11 but is hasn't been migrated to server-tools repo v11. Any clue about how to install Mis builder for Odoo 11 or I just need the date_range from v10?

Thanks for your help

@sbidoul

Instance-level toggle for Display detail by account

On mis.report.instance, add a flag no_auto_expand_accounts that disables expansion of account details for all kpis.

This should allow the creation of templates that have account expansion on by default, while disabling it on specific reports that use the template.

cc/ @jbeficent

expand scope of style expressions

It is currently possible to define style expressions at the kpi level.

Eg: 'some style' if profit < 0 else 'some other style'.

That works fine for reports where the only difference between columns is the time period.

For reports made possible in version 3 where columns are more specialized, it makes sense to have style expressions apply at the column level (eg to apply something such as 'red' if cell_val < 0 else ''.

Such generic style expressions should be defined on styles (so one can define styles such as red if negative), and then applied at the column level with the implementation of #14.

Multi-company budget consolidation

mis_builder can consolidate actuals from different companies. One can imagine to consolidate budgets from different companies too. To be elaborated.

[8.0] Cannot Install mis-builder

Hi I am getting the following issue when trying to install mis_builder

2017-12-16 22:24:02,269 60780 DEBUG ? openerp.service.server: cron2 polling for jobs
2017-12-16 22:24:08,325 60780 DEBUG erp-example-com openerp.modules.loading: Updating graph with 331 more modules
2017-12-16 22:24:08,326 60780 INFO erp-example-com openerp.modules.loading: loading 332 modules...
2017-12-16 22:24:08,638 60780 INFO erp-example-com openerp.modules.loading: 332 modules loaded in 0.31s, 0 queries
2017-12-16 22:24:08,651 60780 DEBUG erp-example-com openerp.modules.loading: Updating graph with 1 more modules
2017-12-16 22:24:08,653 60780 INFO erp-example-com openerp.modules.loading: loading 333 modules...
2017-12-16 22:24:10,023 60780 DEBUG erp-example-com openerp.fields: Field product.pricelist.version.tmpl_in_count is recursively defined
2017-12-16 22:24:10,024 60780 INFO erp-example-com openerp.modules.module: module mis_builder: creating or updating database tables
2017-12-16 22:24:10,051 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': created
2017-12-16 22:24:10,062 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'default_css_style' with definition=VARCHAR
2017-12-16 22:24:10,069 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,069 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,071 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,077 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'compare_method' with definition=VARCHAR
2017-12-16 22:24:10,079 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': column 'compare_method': added a NOT NULL constraint
2017-12-16 22:24:10,082 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'sequence' with definition=int4
2017-12-16 22:24:10,088 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'type' with definition=VARCHAR
2017-12-16 22:24:10,091 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': column 'type': added a NOT NULL constraint
2017-12-16 22:24:10,093 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'divider' with definition=VARCHAR
2017-12-16 22:24:10,096 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'description' with definition=VARCHAR
2017-12-16 22:24:10,101 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': column 'description': added a NOT NULL constraint
2017-12-16 22:24:10,104 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,104 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,106 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'suffix' with definition=VARCHAR(16)
2017-12-16 22:24:10,109 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'css_style' with definition=VARCHAR
2017-12-16 22:24:10,113 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,115 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'report_id' with definition=int4
2017-12-16 22:24:10,115 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added foreign key 'report_id' with definition=REFERENCES "mis_report" ON DELETE cascade
2017-12-16 22:24:10,121 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'expression' with definition=VARCHAR
2017-12-16 22:24:10,127 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': column 'expression': added a NOT NULL constraint
2017-12-16 22:24:10,129 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'dp' with definition=int4
2017-12-16 22:24:10,135 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': added column 'name' with definition=VARCHAR(32)
2017-12-16 22:24:10,138 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_kpi': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,158 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': created
2017-12-16 22:24:10,162 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'model_id' with definition=int4
2017-12-16 22:24:10,163 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added foreign key 'model_id' with definition=REFERENCES "ir_model" ON DELETE set null
2017-12-16 22:24:10,169 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': column 'model_id': added a NOT NULL constraint
2017-12-16 22:24:10,174 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'domain' with definition=VARCHAR
2017-12-16 22:24:10,177 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,180 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'name' with definition=VARCHAR(32)
2017-12-16 22:24:10,185 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,188 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,188 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,190 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,190 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,196 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'date_field' with definition=int4
2017-12-16 22:24:10,196 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added foreign key 'date_field' with definition=REFERENCES "ir_model_fields" ON DELETE set null
2017-12-16 22:24:10,199 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': column 'date_field': added a NOT NULL constraint
2017-12-16 22:24:10,213 60780 DEBUG erp-example-com openerp.models.schema: Table 'ir_model_fields_mis_report_query_rel': added foreign key 'ir_model_fields_id' with definition=REFERENCES "ir_model_fields" ON DELETE cascade
2017-12-16 22:24:10,214 60780 DEBUG erp-example-com openerp.models.schema: Table 'ir_model_fields_mis_report_query_rel': added foreign key 'mis_report_query_id' with definition=REFERENCES "mis_report_query" ON DELETE cascade
2017-12-16 22:24:10,222 60780 DEBUG erp-example-com openerp.models.schema: Create table 'ir_model_fields_mis_report_query_rel': m2m relation between 'mis_report_query' and 'ir_model_fields'
2017-12-16 22:24:10,222 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'aggregate' with definition=VARCHAR
2017-12-16 22:24:10,229 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,231 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added column 'report_id' with definition=int4
2017-12-16 22:24:10,232 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_query': added foreign key 'report_id' with definition=REFERENCES "mis_report" ON DELETE cascade
2017-12-16 22:24:10,257 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': created
2017-12-16 22:24:10,262 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,262 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,265 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,270 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'description' with definition=VARCHAR
2017-12-16 22:24:10,277 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,277 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,280 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,287 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': added column 'name' with definition=VARCHAR
2017-12-16 22:24:10,289 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,324 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': created
2017-12-16 22:24:10,329 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,329 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,332 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,338 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'name' with definition=VARCHAR(32)
2017-12-16 22:24:10,340 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,349 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period_rel': added foreign key 'compare_period_id' with definition=REFERENCES "mis_report_instance_period" ON DELETE cascade
2017-12-16 22:24:10,350 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period_rel': added foreign key 'period_id' with definition=REFERENCES "mis_report_instance_period" ON DELETE cascade
2017-12-16 22:24:10,357 60780 DEBUG erp-example-com openerp.models.schema: Create table 'mis_report_instance_period_rel': m2m relation between 'mis_report_instance_period' and 'mis_report_instance_period'
2017-12-16 22:24:10,357 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'sequence' with definition=int4
2017-12-16 22:24:10,360 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'normalize_factor' with definition=int4
2017-12-16 22:24:10,362 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,362 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,364 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'report_instance_id' with definition=int4
2017-12-16 22:24:10,364 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added foreign key 'report_instance_id' with definition=REFERENCES "mis_report_instance" ON DELETE cascade
2017-12-16 22:24:10,367 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'offset' with definition=int4
2017-12-16 22:24:10,369 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'duration' with definition=int4
2017-12-16 22:24:10,371 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,380 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added column 'type' with definition=VARCHAR
2017-12-16 22:24:10,382 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': column 'type': added a NOT NULL constraint
2017-12-16 22:24:10,398 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added constraint 'mis_report_instance_period_duration' with definition=CHECK (duration>0)
2017-12-16 22:24:10,402 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added constraint 'mis_report_instance_period_normalize_factor' with definition=CHECK (normalize_factor>0)
2017-12-16 22:24:10,409 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance_period': added constraint 'mis_report_instance_period_name_unique' with definition=unique(name, report_instance_id)
2017-12-16 22:24:10,440 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': created
2017-12-16 22:24:10,446 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,446 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,449 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,455 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'name' with definition=VARCHAR
2017-12-16 22:24:10,459 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,466 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'description' with definition=VARCHAR
2017-12-16 22:24:10,473 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'company_id' with definition=int4
2017-12-16 22:24:10,473 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added foreign key 'company_id' with definition=REFERENCES "res_company" ON DELETE set null
2017-12-16 22:24:10,477 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,477 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,480 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'landscape_pdf' with definition=bool
2017-12-16 22:24:10,488 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,491 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'date' with definition=date
2017-12-16 22:24:10,495 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'root_account' with definition=int4
2017-12-16 22:24:10,495 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added foreign key 'root_account' with definition=REFERENCES "account_account" ON DELETE set null
2017-12-16 22:24:10,498 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': column 'root_account': added a NOT NULL constraint
2017-12-16 22:24:10,505 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'target_move' with definition=VARCHAR
2017-12-16 22:24:10,508 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': column 'target_move': added a NOT NULL constraint
2017-12-16 22:24:10,512 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added column 'report_id' with definition=int4
2017-12-16 22:24:10,512 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': added foreign key 'report_id' with definition=REFERENCES "mis_report" ON DELETE set null
2017-12-16 22:24:10,515 60780 DEBUG erp-example-com openerp.models.schema: Table 'mis_report_instance': column 'report_id': added a NOT NULL constraint
2017-12-16 22:24:10,544 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': created
2017-12-16 22:24:10,557 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'create_uid' with definition=int4
2017-12-16 22:24:10,557 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added foreign key 'create_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,564 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'create_date' with definition=timestamp
2017-12-16 22:24:10,567 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'name' with definition=VARCHAR(32)
2017-12-16 22:24:10,570 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': column 'name': added a NOT NULL constraint
2017-12-16 22:24:10,573 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'write_uid' with definition=int4
2017-12-16 22:24:10,574 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added foreign key 'write_uid' with definition=REFERENCES "res_users" ON DELETE set null
2017-12-16 22:24:10,577 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'dashboard_id' with definition=int4
2017-12-16 22:24:10,577 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added foreign key 'dashboard_id' with definition=REFERENCES "ir_act_window" ON DELETE set null
2017-12-16 22:24:10,584 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': column 'dashboard_id': added a NOT NULL constraint
2017-12-16 22:24:10,591 60780 DEBUG erp-example-com openerp.models.schema: Table 'add_mis_report_instance_dashboard_wizard': added column 'write_date' with definition=timestamp
2017-12-16 22:24:10,745 60780 INFO erp-example-com openerp.models: Storing computed values of mis.report.instance fields company_id
2017-12-16 22:24:10,748 60780 INFO erp-example-com openerp.modules.loading: loading mis_builder/wizard/mis_builder_dashboard.xml
2017-12-16 22:24:10,803 60780 INFO erp-example-com openerp.modules.loading: loading mis_builder/views/mis_builder.xml
2017-12-16 22:24:11,134 60780 ERROR erp-example-com openerp.addons.base.ir.ir_ui_view: Field `prefix` does not exist

Error context:
View `mis.report.view.form`
[view_id: 2373, xml_id: n/a, model: mis.report, parent_id: n/a]
2017-12-16 22:24:11,134 60780 DEBUG erp-example-com openerp.models: Exception while validating constraint
Traceback (most recent call last):
  File "/opt/odoo/oca80/openerp/models.py", line 1254, in _validate_fields
    valid = valid or fun(self._model, cr, uid, ids)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 208, in _check_xml
    self.postprocess_and_fields(cr, uid, view.model, view_doc, view.id, context=context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 819, in postprocess_and_fields
    fields_def = self.postprocess(cr, user, model, node, view_id, False, fields, context=context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 729, in postprocess
    fields.update(self.postprocess(cr, user, model, f, view_id, in_tree_view, model_fields, context))
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 729, in postprocess
    fields.update(self.postprocess(cr, user, model, f, view_id, in_tree_view, model_fields, context))
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 729, in postprocess
    fields.update(self.postprocess(cr, user, model, f, view_id, in_tree_view, model_fields, context))
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 656, in postprocess
    xarch, xfields = self.postprocess_and_fields(cr, user, field.comodel_name, f, view_id, ctx)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 845, in postprocess_and_fields
    self.raise_view_error(cr, user, message, view_id, context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 368, in raise_view_error
    raise AttributeError(message)
AttributeError: Field `prefix` does not exist

Error context:
View `mis.report.view.form`
[view_id: 2373, xml_id: n/a, model: mis.report, parent_id: n/a]
2017-12-16 22:24:11,137 60780 ERROR erp-example-com openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/opt/odoo/oca80/openerp/http.py", line 546, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/oca80/openerp/http.py", line 583, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/oca80/openerp/http.py", line 319, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/http.py", line 316, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/oca80/openerp/http.py", line 812, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/oca80/openerp/http.py", line 412, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/oca80/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/oca80/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/module/module.py", line 447, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/module/module.py", line 495, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/opt/odoo/oca80/openerp/modules/registry.py", line 370, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/oca80/openerp/modules/loading.py", line 354, in load_modules
    loaded_modules, update_module)
  File "/opt/odoo/oca80/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/oca80/openerp/modules/loading.py", line 176, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/opt/odoo/oca80/openerp/modules/loading.py", line 118, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/oca80/addons-oca/stock-logistics-workflow/stock_scanner/load_scenario.py", line 229, in scenario_convert_file
    kind=kind, report=report, pathname=pathname)
  File "/opt/odoo/oca80/openerp/tools/convert.py", line 897, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/opt/odoo/oca80/openerp/tools/convert.py", line 983, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/opt/odoo/oca80/openerp/tools/convert.py", line 849, in parse
    self._tags[rec.tag](self.cr, rec, n, mode=mode)
  File "/opt/odoo/oca80/openerp/tools/convert.py", line 759, in _tag_record
    id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_model.py", line 1069, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/addons/base/ir/ir_ui_view.py", line 263, in create
    context=context)
  File "/opt/odoo/oca80/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/oca80/addons-oca/connector/connector/producer.py", line 48, in create
    record_id = create_original(self, vals)
  File "/opt/odoo/oca80/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/models.py", line 4123, in create
    record = self.browse(self._create(old_vals))
  File "/opt/odoo/oca80/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/api.py", line 508, in new_api
    result = method(self._model, cr, uid, *args, **old_kwargs)
  File "/opt/odoo/oca80/openerp/models.py", line 4320, in _create
    recs._validate_fields(vals)
  File "/opt/odoo/oca80/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/oca80/openerp/models.py", line 1275, in _validate_fields
    raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Field `prefix` does not exist

Error context:
View `mis.report.view.form`
[view_id: 2373, xml_id: n/a, model: mis.report, parent_id: n/a]" while parsing /opt/odoo/oca80/addons-oca/mis-builder/mis_builder/views/mis_builder.xml:23, near
<record model="ir.ui.view" id="mis_report_view_form">
            <field name="name">mis.report.view.form</field>
            <field name="model">mis.report</field>
            <field name="arch" type="xml">
                <form string="MIS Report" version="7.0">
                <sheet>
                    <group col="2">
                        <field name="name"/>
                        <field name="description"/>
                    </group>
                    <group string="Queries">
                        <field name="query_ids" nolabel="1" colspan="2">
                            <tree string="Queries" editable="bottom">
                                <field name="name"/>
                                <field name="model_id"/>
                                <field name="field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"/>
                                <field name="field_names"/>
                                <field name="aggregate"/>
                                <field name="date_field" domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"/>
                                <field name="domain"/>
                            </tree>
                        </field>
                    </group>
                    <group string="KPI's">
                        <field name="kpi_ids" nolabel="1" colspan="2">
                            <tree string="KPI's" editable="bottom">
                                <field name="sequence" widget="handle"/>
                                <field name="description"/>
                                <field name="name"/>
                                <field name="expression"/>
                                <field name="type"/>
                                <field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/>
                                <field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/>
                                <field name="prefix"/>
                                <field name="suffix"/>
                                <field name="compare_method" attrs="{'invisible': [('type', '=', 'str')]}"/>
                                <field name="default_css_style"/>
                                <field name="css_style"/>
                            </tree>
                        </field>
                    </group>
                    <group col="2" string="Legend (for kpi expressions)">
                        <group>
                            <label colspan="2" string="Expressions are of the form &lt;field&gt;&lt;mode&gt;[accounts][domain]"/>
                            <label colspan="2" string="Possible values for 'field' can be:"/>
                            <group>
                                <label colspan="2" string="* bal for balance (debit - credit)"/>
                                <label colspan="2" string="* crd for credit"/>
                                <label colspan="2" string="* deb for debit"/>
                            </group>
                            <label colspan="2" string="Possible values for 'mode' are:"/>
                            <group>
                                <label colspan="2" string="* nothing or p: variation over the period"/>
                                <label colspan="2" string="* i: at the beginning of the period"/>
                                <label colspan="2" string="* e: at the end of the period"/>
                            </group>
                            <label colspan="2" string="'accounts' is a comma-separated list of account codes, possibly containing %% wildcards"/>
                            <label colspan="2" string="'domain' is an optional filter on move lines (eg to filter on analytic accounts or journal)"/>
                       </group>
                       <group>
                            <label colspan="2" string="Examples"/>
                            <group>
                                <label colspan="2" string="* bal[70]: variation of the balance of account 70 over the period (it is the same as balp[70]);"/>
                                <label colspan="2" string="* bali[70,60]: initial balance of accounts 70 and 60;"/>
                                <label colspan="2" string="* bale[1%%]: balance of accounts starting with 1 at end of period."/>
                            </group>
                        </group>
                    </group>
                </sheet>
                </form>
            </field>
        </record>
2017-12-16 22:24:11,140 60780 INFO erp-example-com werkzeug: 127.0.0.1 - - [16/Dec/2017 22:24:11] "POST /web/dataset/call_button HTTP/1.0" 200 -
2017-12-16 22:24:11,146 60780 INFO erp-example-com openerp.modules.loading: loading 1 modules...
2017-12-16 22:24:11,155 60780 INFO erp-example-com openerp.modules.loading: 1 modules loaded in 0.01s, 0 queries
2017-12-16 22:24:12,061 60780 DEBUG erp-example-com openerp.modules.loading: Updating graph with 331 more modules
2017-12-16 22:24:12,062 60780 INFO erp-example-com openerp.modules.loading: loading 332 modules...
2017-12-16 22:24:12,277 60780 INFO erp-example-com openerp.modules.loading: 332 modules loaded in 0.21s, 0 queries
2017-12-16 22:24:13,916 60780 DEBUG erp-example-com openerp.fields: Field product.pricelist.version.tmpl_in_count is recursively defined
2017-12-16 22:24:13,918 60780 INFO erp-example-com openerp.modules.loading: Modules loaded.
2017-12-16 22:24:32,381 60780 DEBUG ? openerp.service.server: cron0 polling for jobs
2017-12-16 22:24:32,387 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: Starting job `Update Printers Status`.
2017-12-16 22:24:32,395 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: cron.object.execute('erp-example-com',
2017-12-16 22:24:32,395 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     1,
2017-12-16 22:24:32,395 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     '*',
2017-12-16 22:24:32,395 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     u'printing.printer',
2017-12-16 22:24:32,396 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     u'update_printers_status')
2017-12-16 22:24:32,415 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: 0.019s (printing.printer, update_printers_status)
2017-12-16 22:25:04,050 60780 DEBUG ? openerp.service.server: cron2 polling for jobs
2017-12-16 22:25:04,055 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: Starting job `Update Printers Status`.
2017-12-16 22:25:04,063 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: cron.object.execute('erp-example-com',
2017-12-16 22:25:04,063 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     1,
2017-12-16 22:25:04,063 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     '*',
2017-12-16 22:25:04,063 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     u'printing.printer',
2017-12-16 22:25:04,064 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron:                     u'update_printers_status')
2017-12-16 22:25:04,081 60780 DEBUG erp-example-com openerp.addons.base.ir.ir_cron: 0.017s (printing.printer, update_printers_status)
2017-12-16 22:25:04,307 60780 DEBUG ? openerp.service.server: cron2 polling for jobs

Not sure what to do. Thanks

When using queries end up with TypeError

I'm trying to get queries on sale order to be used as KPI, below an example how I have configured it

image

but I'm ending up always with the traceback below. Maybe I'm missing something, any idea how to fix it?

File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_instance.py", line 681, in compute
kpi_matrix = self._compute_matrix()
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_instance.py", line 673, in _compute_matrix
self._add_column(aep, kpi_matrix, period, period.name, description)
File "/OtherData/oca/mis-builder/mis_builder_budget/models/mis_report_instance.py", line 64, in _add_column
aep, kpi_matrix, period, label, description)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_instance.py", line 641, in _add_column
aep, kpi_matrix, period, label, description)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_instance.py", line 601, in _add_column_actuals
period._get_additional_query_filter)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report.py", line 817, in declare_and_compute_period
locals_dict, eval_expressions, eval_expressions_by_account)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report.py", line 691, in _declare_and_compute_col
kpi, col_key, vals, drilldown_args)
File "/OtherData/oca/mis-builder/mis_builder/models/kpimatrix.py", line 217, in set_values
drilldown_args, tooltips)
File "/OtherData/oca/mis-builder/mis_builder/models/kpimatrix.py", line 245, in set_values_detail_account
self.lang, row.style_props, kpi.type, val)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_style.py", line 167, in render
style_props.prefix, style_props.suffix)
File "/OtherData/oca/mis-builder/mis_builder/models/mis_report_style.py", line 179, in render_num
value = round(value / float(divider or 1), dp or 0) or 0
TypeError: unsupported operand type(s) for /: 'AutoStruct' and 'float'

procedure to backport version 3 to 8.0 series

mis_builder latest features (since version 2) are only available for Odoo series 9.0+.

If you are interested in backporting it to the 8.0 series, the following procedure should be the simplest:

  1. create a module account_value_date in OCA/account-financial-tools that adds a value_date computed field to account.move.line (value_date being equal to date if with the account.period, else the last day of the period)
  2. start from the 9.0 branch and replace date by value_date in aep.py and replace date.range by account.period everywhere else
  3. Preserve 8.0 AEP algorithm for initial balance calculation based on opening periods.
  4. Update the test suite to reintroduce account.period where necessary.
  5. test and fix all other details which hopefully should not be too numerous

aep.py float_is_zero rounding

Are you sure the following:

float_is_zero(debit-credit,
precision_rounding=self.dp)

is right?
Correct me if I'm wrong but it seems that self.dp which is currency decimal_places is the number of decimals to take, this is an integer like 2 decimals (1.01) and you are passing this in the precision_rounding parameter of float_is_zero.
Shouldn't you use the precision_digits parameters instead?

float_is_zero(debit-credit,
precision_digits=self.dp)

[V10] mis-builder - odoo client error- error: Qweb2 : template 'FieldColor' not found

I install MIS builder V10 into Odoo 10 CE, in a database. I have odoo client error pop-up saying that error Qweb2: template 'FieldColor' not found. When try to create or edit report style

image

Step to Reproduce:
On Odoo 10 CE local installation at new or existing database install the MIS builder -- success install
Go to accounting - configuration - MIS Reporting --open MIS Report Styles
click Create button, the odoo client error windows pop-up
edit existing style record also the same error happen

Expected behavior, can edit or create style accordingly

screen shot:
as above

Please help how to solve the issue, no complain during the installation process

Thank you

Generalize computed colums

There is currently a sum/difference data source that allows the creation of columns that are a sum/difference of other columns.

This mechanism could be genralized by allowing arbitrary python expressions on columns.

The initial use case for this is to create a column that is the average of other columns.

Cash Flow Forecast

Anyone working or planning a cash flow forecast using mis_builder?

If I'm no wrong it would be great to allow account.move.line analysis via de date_maturity field. It could be solved by mis_bilder queries by I think it would be better (and easier) to allow using date_maturity directly with some parameter on kpis.

@sbidoul any thoughts to share?

BR!

Option to display only rows that are not 0

In Spain it is required that the Profit & Loss and Balance Sheet presented to the authorities should only contain the lines that have some amount.

The P&L and BS are very large in extension, and many companies only use a small portion of the complete Chart of Accounts.

I am thinking on a flag at mis.report.kpi hide rows with 0 values. If all the columns in the row are 0 the line would not be listed.

Invisible KPI

Sometimes it is desirable to have invisible KPI. For instance:

  • when a complex formula must be reused in different KPI, but the actual result of the formula is not interesting for display.
  • when a kpi is needed for that export, but not for the interactive view of the same report

This would be ideally implemented with a dedicated style property.

Control visibility of analytic filter combo box in widget

On mis.report.instance, add a flag to control the visibility of the analytic filter combo box in the widget.

For some report (eg Balance Sheet), the analytic filter makes no sense, while on other reports it does. So it must be controllable on a per instance basis, and not only with the security group.

multi-company consolidation

From @Martronic-SA on April 6, 2017 8:20

As said in the Readme, we might add a list of companies (which might have their own currencies) and convert amounts for each company/currency to user company currency. That's what Odoo does in account_reports.
As we probably will have to implement this in the mis builder, could you give us advices or ideas to start the project?
Thanks!

Copied from original issue: OCA/account-financial-reporting#295

Control display of from/to dates in column headers

Displaying date from-to in the column header is not always useful. For columns with relative periods it helps but for columns named manually by the user, it is often useless.

This display could be controlled by a flag on mis.report.instance.period.

Show analytic filter in exported pdf and xls

This could be done with a filter_description computed field on mis.report.instance.

This field could then be displayed:

  • in the Filters tab on the mis.report.instance form
  • in the Excel export
  • in the PDF export

Migration to version 11.0

Migrate dependencies:

Procedure

  • 1. merge #1 in 9.0
  • 2. merge 9.0 in 10.0 and adapt
  • 3. create 11.0 branch from 10.0 and make modules uninstallable
  • 4. do whatever is needed to adapt to 11.0 #67 (please create PR's to branch 11.0-dev to contribute)

Note all python 3 compatibility changes that can be made in a python 2 compatible way should be made on the 10.0 branch to facilitate forward porting of future evolutions.

Functional and technical documentation

Several people have expressed interest for writing functional documentation.

This issue is for coordinating this effort.

Technically, it must be in .rst format.

I propose to create one docs directory at the root of the repository.

Ideally, the documentation should be modular, to enable to generate a subset for each module (mis_builder, mis_builder_budget) while keeping the possibility to generate a documentation web site for the whole set.

I'll try to put the documentation framework in place soon. In the meantime do not hesitate to propose what you have, in any format.

[blueprint] visual fold/unfold mechanism

From @sbidoul on April 16, 2016 16:25

Problem statement

With large reports, such as a complete chart of account it can be desirable to express a parent/child relationship between KPI's and let the user fold/unfold parent KPI's on screen when using the mis builder widget.

Implementation proposal: backend

Add fields on mis.report.kpi

  • parent_id
  • fold_default: open|closed (default open)

A parent/child relationship does not imply any automatic computation.

The parent/child relationship may influence/enforce ordering of kpi's.

Implementation proposal: UI

  • display folding icons (only if a KPI has children)
  • automatically indent row labels based on parent-child relationship

Further possible improvements to be investigated

  • it may be useful to provide the list of children kpi values in the computation context of a kpi
  • it may be useful to improve the computation algorithm to compute children before parents, knowing that in many circumstances a visual folding implies a dependency on the children values

Copied from original issue: OCA/account-financial-reporting#180

Having different companies per lines

The new aep expression parsing and domain filter is working very well.
The only issue I have faced is when you try to have different companies per line using for example:
bale[('company_id','=',False),('user_type_id','in',(12,13,14,15,16))]
This is used in my case to get the total revenue for every companies together in a particular P&L.
and if you have another line with
bale[('user_type_id','in',(12,13,14,15,16))]
both will show the same value as the key generated in self._map_account_ids will be the same for both two lines even if the accounts are not the same (depending on the company choice).
I've found a workaround by first looking for 'company_id' in account domain and add the companies found to the related self._map_account_id key.

That needs further reflection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.