diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09ac0f395..48ec165bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,6 @@ exclude: | (?x) # NOT INSTALLABLE ADDONS - ^mis_builder/| ^mis_builder_budget/| ^mis_builder_demo/| # END NOT INSTALLABLE ADDONS diff --git a/mis_builder/README.rst b/mis_builder/README.rst index 1f6f4f83b..63bd14053 100644 --- a/mis_builder/README.rst +++ b/mis_builder/README.rst @@ -17,22 +17,22 @@ MIS Builder :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmis--builder-lightgray.png?logo=github - :target: https://github.com/OCA/mis-builder/tree/16.0/mis_builder + :target: https://github.com/OCA/mis-builder/tree/17.0/mis_builder :alt: OCA/mis-builder .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/mis-builder-16-0/mis-builder-16-0-mis_builder + :target: https://translation.odoo-community.org/projects/mis-builder-17-0/mis-builder-17-0-mis_builder :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/mis-builder&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/mis-builder&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows you to build Management Information Systems dashboards. -Such style of reports presents KPI in rows and time periods in columns. -Reports mainly fetch data from account moves, but can also combine data coming -from arbitrary Odoo models. Reports can be exported to PDF, Excel and they -can be added to Odoo dashboards. +This module allows you to build Management Information Systems +dashboards. Such style of reports presents KPI in rows and time periods +in columns. Reports mainly fetch data from account moves, but can also +combine data coming from arbitrary Odoo models. Reports can be exported +to PDF, Excel and they can be added to Odoo dashboards. **Table of contents** @@ -46,597 +46,640 @@ Your preferred way to install addons will work with MIS Builder. An easy way to install it with all its dependencies is using pip: -* ``pip install --pre odoo12-addon-mis_builder`` -* then restart Odoo, update the addons list in your database, and install - the MIS Builder application. +- ``pip install --pre odoo12-addon-mis_builder`` +- then restart Odoo, update the addons list in your database, and + install the MIS Builder application. Usage ===== To configure this module, you need to: -* Go to Accounting > Configuration > MIS Reporting > MIS Report Templates where - you can create report templates by defining KPI's. KPI's constitute the rows of your - reports. Such report templates are time independent. +- Go to Accounting > Configuration > MIS Reporting > MIS Report + Templates where you can create report templates by defining KPI's. + KPI's constitute the rows of your reports. Such report templates are + time independent. -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_template.png - :alt: Sample report template - :width: 80 % - :align: center +|image1| -* Then in Accounting > Reports > MIS Reporting > MIS Reports you can create report instance by - binding the templates to time periods, hence defining the columns of your reports. +- Then in Accounting > Reports > MIS Reporting > MIS Reports you can + create report instance by binding the templates to time periods, + hence defining the columns of your reports. -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_settings.png - :alt: Sample report configuration - :width: 80 % - :align: center +|image2| -* From the MIS Reports view, you can preview the report, add it to and Odoo dashboard, - and export it to PDF or Excel. +- From the MIS Reports view, you can preview the report, add it to and + Odoo dashboard, and export it to PDF or Excel. -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_preview.png - :alt: Sample preview - :width: 80 % - :align: center +|image3| + +.. |image1| image:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_template.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_settings.png +.. |image3| image:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_preview.png Development =========== -A typical extension is to provide a mechanism to filter reports on analytic dimensions -or operational units. To implement this, you can override _get_additional_move_line_filter -and _get_additional_filter to further filter move lines or queries 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. +A typical extension is to provide a mechanism to filter reports on +analytic dimensions or operational units. To implement this, you can +override \_get_additional_move_line_filter and \_get_additional_filter +to further filter move lines or queries 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. Known issues / Roadmap ====================== -The mis_builder `roadmap `_ -and `known issues `_ can -be found on GitHub. +The mis_builder +`roadmap `__ +and `known +issues `__ +can be found on GitHub. Changelog ========= 16.0.5.1.9 (2024-02-09) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Restore compatibility with python 3.9 (`#590 `_) - +- Restore compatibility with python 3.9 + (`#590 `__) 16.0.5.1.8 (2024-02-08) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Resolve a permission issue when creating report periods with a user without admin rights. (`#596 `_) - +- Resolve a permission issue when creating report periods with a user + without admin rights. + (`#596 `__) 16.0.5.1.0 (2023-04-04) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Improve UX by adding the option to edit the pivot date directly on the view. +- Improve UX by adding the option to edit the pivot date directly on + the view. 16.0.5.0.0 (2023-04-01) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Migration to 16.0 - - - Addition of a generic filter domain on reports and columns. - - Addition of a search bar to the widget. The corresponding search view is configurable - per report. - - Huge improvement of the widget style. This was long overdue. - - Make the MIS Report menu accessible to the Billing Administrator group - (instead of the hidden Show Full Accounting Features), to align with the access rules - and avoid giving a false sense of security. This also makes the menu discoverable to - new users. - - Removal of analytic fetures because the upstream ``analytic_distribution`` mechanism - is not compatible; support may be introduced in separate module, depending on use - cases. - - Abandon the ``mis_report_filters`` context key which had security implication. - It is replaced by a ``mis_analytic_domain`` context key which is ANDed with other - report-defined filters. (`#472 `_) - - Rename the ``get_filter_descriptions_from_context`` method to - ``get_filter_descriptions``. This method may be overridden to provide additional - subtitles on the PDF or XLS report, representing user-selected filters. - - The ``hide_analytic_filters`` has been replaced by ``widget_show_filters``. - - The visibility of the settings button on the widget is now controlled by a - ``show_settings_button``. Before it was visible only for the ``account_user`` group - but this was not flexible enough. - - The widget configuration settings are now grouped in a dedicated ``Widget`` tab in - the report configuration form. +- Migration to 16.0 + + - Addition of a generic filter domain on reports and columns. + - Addition of a search bar to the widget. The corresponding search + view is configurable per report. + - Huge improvement of the widget style. This was long overdue. + - Make the MIS Report menu accessible to the Billing Administrator + group (instead of the hidden Show Full Accounting Features), to + align with the access rules and avoid giving a false sense of + security. This also makes the menu discoverable to new users. + - Removal of analytic fetures because the upstream + ``analytic_distribution`` mechanism is not compatible; support may + be introduced in separate module, depending on use cases. + - Abandon the ``mis_report_filters`` context key which had security + implication. It is replaced by a ``mis_analytic_domain`` context + key which is ANDed with other report-defined filters. + (`#472 `__) + - Rename the ``get_filter_descriptions_from_context`` method to + ``get_filter_descriptions``. This method may be overridden to + provide additional subtitles on the PDF or XLS report, + representing user-selected filters. + - The ``hide_analytic_filters`` has been replaced by + ``widget_show_filters``. + - The visibility of the settings button on the widget is now + controlled by a ``show_settings_button``. Before it was visible + only for the ``account_user`` group but this was not flexible + enough. + - The widget configuration settings are now grouped in a dedicated + ``Widget`` tab in the report configuration form. **Bugfixes** -- Fix access error when previewing or printing report. (`#415 `_) - +- Fix access error when previewing or printing report. + (`#415 `__) 15.0.4.0.5 (2022-07-19) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Support users without timezone. (`#388 `_) - +- Support users without timezone. + (`#388 `__) 15.0.4.0.4 (2022-07-19) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Allow deleting a report that has subreports. (`#431 `_) - +- Allow deleting a report that has subreports. + (`#431 `__) 15.0.4.0.2 (2022-02-16) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Fix access right issue when clicking the "Save" button on a MIS Report Instance form. (`#410 `_) - +- Fix access right issue when clicking the "Save" button on a MIS + Report Instance form. + (`#410 `__) 14.0.4.0.0 (2022-01-08) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Remove various field size limits. (`#332 `_) - +- Remove various field size limits. + (`#332 `__) **Bugfixes** -- Support for the Odoo 13+ multi-company model. In multi-company mode, several allowed - companies can be declared on MIS Report instances, and the report operates on the - intersection of report companies and companies selected in the user context. (`#327 `_) -- The ``get_additional_query_filter`` argument of ``evaluate()`` is now propagated - correctly. (`#375 `_) -- Use the ``parent_state`` field of ``account.move.line`` to filter entries in ``posted`` - and ``draft`` state only. Before, when reporting in draft mode, all entries were used - (i.e. there was no filter), and that started including the cancelled entries/invoices in - Odoo 13.+. - - This change also contains a **breaking change** in the internal API. For quite a while - the ``target_move argument`` of AEP and other methods was not used by MIS Builder itself - and was kept for backward compatibility. To avoid rippling effects of the necessary - change to use ``parent_state``, we now remove this argument. (`#377 `_) - +- Support for the Odoo 13+ multi-company model. In multi-company mode, + several allowed companies can be declared on MIS Report instances, + and the report operates on the intersection of report companies and + companies selected in the user context. + (`#327 `__) + +- The ``get_additional_query_filter`` argument of ``evaluate()`` is now + propagated correctly. + (`#375 `__) + +- Use the ``parent_state`` field of ``account.move.line`` to filter + entries in ``posted`` and ``draft`` state only. Before, when + reporting in draft mode, all entries were used (i.e. there was no + filter), and that started including the cancelled entries/invoices in + Odoo 13.+. + + This change also contains a **breaking change** in the internal API. + For quite a while the ``target_move argument`` of AEP and other + methods was not used by MIS Builder itself and was kept for backward + compatibility. To avoid rippling effects of the necessary change to + use ``parent_state``, we now remove this argument. + (`#377 `__) 14.0.3.6.7 (2021-06-02) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- When on a MIS Report Instance, if you wanted to generate a new line of type comparison, you couldn't currently select any existing period to compare. - This happened because the field domain was searching in a NewId context, thus not finding a correct period. - Changing the domain and making it use a computed field with a search for the _origin record solves the problem. (`#361 `_) - +- When on a MIS Report Instance, if you wanted to generate a new line + of type comparison, you couldn't currently select any existing period + to compare. This happened because the field domain was searching in a + NewId context, thus not finding a correct period. Changing the domain + and making it use a computed field with a search for the \_origin + record solves the problem. + (`#361 `__) 14.0.3.6.6 (2021-04-23) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Fix drilldown action name when the account model has been customized. (`#350 `_) - +- Fix drilldown action name when the account model has been customized. + (`#350 `__) 14.0.3.6.5 (2021-04-23) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- While duplicating a MIS report instance, comparison columns are ignored because - they would raise an error otherwise, as they keep the old source_cmpcol_from_id - and source_cmpcol_to_id from the original record. (`#343 `_) - +- While duplicating a MIS report instance, comparison columns are + ignored because they would raise an error otherwise, as they keep the + old source_cmpcol_from_id and source_cmpcol_to_id from the original + record. (`#343 `__) 14.0.3.6.4 (2021-04-06) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- The drilldown action name displayed on the breadcrumb has been revised. - The kpi description and the account ``display_name`` are shown instead - of the kpi's technical definition. (`#304 `_) -- Add analytic group filters on report instance, periods and in the interactive - view. (`#320 `_) - +- The drilldown action name displayed on the breadcrumb has been + revised. The kpi description and the account ``display_name`` are + shown instead of the kpi's technical definition. + (`#304 `__) +- Add analytic group filters on report instance, periods and in the + interactive view. + (`#320 `__) 13.0.3.6.3 (2020-08-28) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Having a "Compare columns" added on a KPI with an associated style using a - Factor/Divider did lead to the said factor being applied on the percentages - when exporting to XLSX. (`#300 `_) - +- Having a "Compare columns" added on a KPI with an associated style + using a Factor/Divider did lead to the said factor being applied on + the percentages when exporting to XLSX. + (`#300 `__) **Misc** -- `#280 `_, `#296 `_ - +- `#280 `__, + `#296 `__ 13.0.3.6.2 (2020-04-22) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- The "Settings" button is now displayed for users with the "Show full accounting features" right when previewing a report. (`#281 `_) - +- The "Settings" button is now displayed for users with the "Show full + accounting features" right when previewing a report. + (`#281 `__) 13.0.3.6.1 (2020-04-22) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Fix ``TypeError: 'module' object is not iterable`` when using - budgets by account. (`#276 `_) - +- Fix ``TypeError: 'module' object is not iterable`` when using budgets + by account. + (`#276 `__) 13.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 the report-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 a dot-prefix - notation. Example: you can define a MIS Report for a "Balance Sheet", and then - have another MIS Report "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 `_) - +- Add column-level filters on analytic account and analytic tags. These + filters are combined with a AND with the report-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 a dot-prefix notation. Example: you can define a MIS + Report for a "Balance Sheet", and then have another MIS Report + "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 `__) 13.0.3.5.0 (2020-01-??) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Migration to odoo 13.0. 12.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 Many2one - relationship with any model that has a ``code`` field (not only with - ``account.account`` model). To this end, the model to be used for Actuals - move lines can be configured on the report template. It can be something else - than move 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 more easily customize their data source. (`#214 `_) -- Support analytic tag filters in the backend view and preview widget. - Selecting several tags in the filter means filtering on move lines which - have *all* these tags set. This is to support the most common use case of - using tags for 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 `_) - +- The ``account_id`` field of the model selected in 'Move lines source' + in the Period form can now be a Many2one relationship with any model + that has a ``code`` field (not only with ``account.account`` model). + To this end, the model to be used for Actuals move lines can be + configured on the report template. It can be something else than move + 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 more easily customize their data source. + (`#214 `__) +- Support analytic tag filters in the backend view and preview widget. + Selecting several tags in the filter means filtering on move lines + which have *all* these tags set. This is to support the most common + use case of using tags for 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** -- Propagate context to xlsx report, so the analytic account filter - works when exporting to xslx too. This also requires a fix to - ``report_xlsx`` (see https://github.com/OCA/reporting-engine/pull/259). (`#178 `_) -- 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 `_) - +- Propagate context to xlsx report, so the analytic account filter + works when exporting to xslx too. This also requires a fix to + ``report_xlsx`` (see + https://github.com/OCA/reporting-engine/pull/259). + (`#178 `__) +- 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 `__) 12.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 officially supported. (`#175 `_) -- In Excel export, use a number format with thousands separator. The - specific separator used depends on the Excel 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 incorrect lenght. (`#196 `_) - +- 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 officially supported. + (`#175 `__) +- In Excel export, use a number format with thousands separator. The + specific separator used depends on the Excel 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 incorrect lenght. + (`#196 `__) **Bugfixes** -- Fix rendering of percentage types in Excel export. (`#192 `_) - +- Fix rendering of percentage types in Excel export. + (`#192 `__) 12.0.3.3.0 (2019-01-26) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** *Dynamic analytic filters in report preview are not yet available in 11, -this requires an update to the JS widget that proved difficult to implement -so far. Help welcome.* - -- Analytic account filters. On a report, an analytic - account can be selected for filtering. The filter will - be applied to move lines queries. A filter box is also - available in the widget to let the user select the analytic - account during report preview. (`#15 `_) -- Control visibility of analytic filter combo box in widget. - This is useful to hide the analytic filters on reports where - 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 not negatively effect existing reports, because - an accounting report must take into account all existing move lines - even if they reference objects such as taxes, journals, accounts types - that have been deactivated since their creation. (`#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 (this is 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 `_) +this requires an update to the JS widget that proved difficult to +implement so far. Help welcome.* + +- Analytic account filters. On a report, an analytic account can be + selected for filtering. The filter will be applied to move lines + queries. A filter box is also available in the widget to let the user + select the analytic account during report preview. + (`#15 `__) +- Control visibility of analytic filter combo box in widget. This is + useful to hide the analytic filters on reports where 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 not negatively effect existing + reports, because an accounting report must take into account all + existing move lines even if they reference objects such as taxes, + journals, accounts types that have been deactivated since their + creation. (`#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 (this is 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 syle elements. (`#121 _`) +- In the style form, hide the "Hide always" checkbox when "Hide always + inherit" is checked, as for all other syle elements. + (`#121 `__) **Upgrading from 3.2 (breaking changes)** -If you use ``Actuals (alternative)`` data source in combination with analytic -filters, the underlying model must now have an ``analytic_account_id`` field. - +If you use ``Actuals (alternative)`` data source in combination with +analytic filters, the underlying model must now have an +``analytic_account_id`` field. 11.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 `_) +- [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 `__) 11.0.3.2.1 (2018-05-29) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -* [FIX] Missing comparison operator for AccountingNone - leading to errors in pbal computations - (`#93 `_) +- [FIX] Missing comparison operator for AccountingNone leading to + errors in pbal computations + (`#93 `__) 10.0.3.2.0 (2018-05-02) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [FIX] make subkpi ordering deterministic - (`#71 `_) -* [ADD] report instance level option to disable account expansion, - enabling the creation of detailed templates while 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 ignoring accounts with negative, - resp positive balances) - (`#86 `_) +----------------------- + +- [FIX] make subkpi ordering deterministic + (`#71 `__) +- [ADD] report instance level option to disable account expansion, + enabling the creation of detailed templates while 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 ignoring accounts with negative, + resp positive balances) + (`#86 `__) 11.0.3.1.2 (2018-02-04) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Migration to Odoo 11. No new feature. -(`#67 `_) +(`#67 `__) 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 of the reporting period) - (`#7 `_, - `#3 `_) -* [ADD] provide ref, datetime, dateutil, time, user in the evaluation - context of move line domains; among other things, 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 account.account, not only account codes - ``balp[('account_type', '=', 'asset_receivable')]`` - (`#4 `_). -* [IMP] in the report instance configuration form, the filters are - now grouped in a notebook page, this improves readability and - extensibility - (`#39 `_). +- [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 of the reporting period) + (`#7 `__, + `#3 `__) +- [ADD] provide ref, datetime, dateutil, time, user in the evaluation + context of move line domains; among other things, 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 account.account, not only account codes + ``balp[('account_type', '=', 'asset_receivable')]`` + (`#4 `__). +- [IMP] in the report instance configuration form, the filters are now + grouped in a notebook page, this improves readability 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 `_ +- [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. +- Alternative move line data sources must have a company_id field. 10.0.3.0.4 (2017-10-14) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Bug fix: -* [FIX] issue with initial balance rounding. - `#30 `_ +- [FIX] issue with initial balance rounding. + `#30 `__ 10.0.3.0.3 (2017-10-03) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Bug fix: -* [FIX] fix error saving KPI on newly created reports. - `#18 `_ +- [FIX] fix error saving KPI on newly created reports. + `#18 `__ 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 on any 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. -* [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 the reporting time period (the basis - for budget item, but could also server other purposes, such as manually - entering some 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 a given 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 dateutil modules +- [ADD] Alternative move line source per report column. This makes mis + buidler accounting expressions work on any 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. +- [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 the reporting time period (the + basis for budget item, but could also server other purposes, such as + manually entering some 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 a given 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 dateutil modules 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 +- [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 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. +- [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. 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. +- [IMP] Add refresh button in mis report preview. +- [IMP] Widget code changes to allow to add fields in the widget more + easily. 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 API changing merged in - urgency before it is used by other modules. +- [IMP] remove unused argument in declare_and_compute_period() for a + cleaner API. This is a breaking API changing merged in urgency before + it is used by other modules. 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 not make sense in this case -* [CHG] The divider suffix (k, M, etc) is not inserted automatically anymore - because it is inconsistent when working with prefixes; you need to add it - manually in the suffix -* [IMP] AccountingExpressionProcessor now supports 'balu' expressions - to obtain the unallocated profit/loss of previous 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 available through 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 different values -* [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 +- [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 not make sense in this case +- [CHG] The divider suffix (k, M, etc) is not inserted automatically + anymore because it is inconsistent when working with prefixes; you + need to add it manually in the suffix +- [IMP] AccountingExpressionProcessor now supports 'balu' expressions + to obtain the unallocated profit/loss of previous 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 available through 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 different values +- [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.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 -* 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 are accessible 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 analytic filtering 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 +---------------------- + +- The copy of a MIS Report Instance now copies period. + https://github.com/OCA/account-financial-reporting/pull/181 +- 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 are accessible 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 analytic filtering 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.0.0.2.0 -~~~~~~~~~ +--------- Pre-history. Or rather, you need to look at the git log. @@ -646,7 +689,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -654,43 +697,46 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE SA/NV Contributors -~~~~~~~~~~~~ - -* Stéphane Bidoul -* Laetitia Gangloff -* Adrien Peiffer -* Alexis de Lattre -* Alexandre Fayolle -* Jordi Ballester -* Thomas Binsfeld -* Giovanni Capalbo -* Marco Calcagni -* Sébastien Beau -* Laurent Mignon -* Luc De Meyer -* Benjamin Willig -* Martronic SA -* nicomacr -* Juan Jose Scarafia -* Richard deMeester -* Eric Caudal -* Andrea Stirpe -* Maxence Groine -* Arnaud Pineux -* Ernesto Tejeda -* Pedro M. Baeza -* Alexey Pelykh -* Jairo Llopis (https://www.moduon.team/) -* Dzung Tran -* Hoang Diep +------------ + +- Stéphane Bidoul +- Laetitia Gangloff +- Adrien Peiffer +- Alexis de Lattre +- Alexandre Fayolle +- Jordi Ballester +- Thomas Binsfeld +- Giovanni Capalbo +- Marco Calcagni +- Sébastien Beau +- Laurent Mignon +- Luc De Meyer +- Benjamin Willig +- Martronic SA +- nicomacr +- Juan Jose Scarafia +- Richard deMeester +- Eric Caudal +- Andrea Stirpe +- Maxence Groine +- Arnaud Pineux +- Ernesto Tejeda +- Pedro M. Baeza +- Alexey Pelykh +- Jairo Llopis (https://www.moduon.team/) +- Dzung Tran +- Hoang Diep +- `APSL `__: + + - Miquel Pascual Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -710,6 +756,6 @@ Current `maintainer `__: |maintainer-sbidoul| -This module is part of the `OCA/mis-builder `_ project on GitHub. +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. diff --git a/mis_builder/__manifest__.py b/mis_builder/__manifest__.py index ff8b369dd..d4e215d6a 100644 --- a/mis_builder/__manifest__.py +++ b/mis_builder/__manifest__.py @@ -3,7 +3,7 @@ { "name": "MIS Builder", - "version": "16.0.5.1.9", + "version": "17.0.1.0.0", "category": "Reporting", "summary": """ Build 'Management Information System' Reports and Dashboards @@ -38,7 +38,7 @@ ], }, "qweb": ["static/src/xml/mis_report_widget.xml"], - "installable": False, + "installable": True, "application": True, "license": "AGPL-3", "development_status": "Production/Stable", diff --git a/mis_builder/migrations/16.0.5.0.0/end-migrate.py b/mis_builder/migrations/16.0.5.0.0/end-migrate.py deleted file mode 100644 index 3a1387a10..000000000 --- a/mis_builder/migrations/16.0.5.0.0/end-migrate.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2023 ACSONE SA/NV () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - -import odoo -from odoo import api - - -def migrate(cr, installed_version): - env = api.Environment(cr, odoo.SUPERUSER_ID, {}) - env["mis.report.instance.period"].search([])._compute_source_aml_model_id() diff --git a/mis_builder/migrations/8.0.2.0.0/post-migration.py b/mis_builder/migrations/8.0.2.0.0/post-migration.py deleted file mode 100644 index 421bb33de..000000000 --- a/mis_builder/migrations/8.0.2.0.0/post-migration.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2017 ACSONE SA/NV () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - - -def migrate(cr, version): - cr.execute( - """ - INSERT INTO mis_report_kpi_expression - (create_uid, create_date, write_uid, write_date, - kpi_id, name, sequence) - SELECT create_uid, create_date, write_uid, write_date, - id, old_expression, sequence - FROM mis_report_kpi - """ - ) - cr.execute( - """ - ALTER TABLE mis_report_kpi - DROP COLUMN old_expression - """ - ) - # set default mode to relative for existing periods - # as it was the only mode in previous versions - cr.execute( - """ - UPDATE mis_report_instance_period - SET mode='relative' - """ - ) diff --git a/mis_builder/migrations/8.0.2.0.0/pre-migration.py b/mis_builder/migrations/8.0.2.0.0/pre-migration.py deleted file mode 100644 index 83fc4b5da..000000000 --- a/mis_builder/migrations/8.0.2.0.0/pre-migration.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2017 ACSONE SA/NV () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - - -def migrate(cr, version): - cr.execute( - """ - ALTER TABLE mis_report_kpi - RENAME COLUMN expression TO old_expression - """ - ) - # this migration to date_range type is partial, - # actual date ranges needs to be created manually - cr.execute( - """ - UPDATE mis_report_instance_period - SET type='date_range' - WHERE type='fp' - """ - ) diff --git a/mis_builder/models/mis_kpi_data.py b/mis_builder/models/mis_kpi_data.py index 4ebbbb1df..f5e51a78e 100644 --- a/mis_builder/models/mis_kpi_data.py +++ b/mis_builder/models/mis_kpi_data.py @@ -26,7 +26,7 @@ class MisKpiData(models.AbstractModel): _name = "mis.kpi.data" _description = "MIS Kpi Data Abtract class" - name = fields.Char(compute="_compute_name", required=False, readonly=True) + name = fields.Char(compute="_compute_name", required=False) kpi_expression_id = fields.Many2one( comodel_name="mis.report.kpi.expression", required=True, @@ -39,13 +39,11 @@ class MisKpiData(models.AbstractModel): seq1 = fields.Integer( related="kpi_expression_id.kpi_id.sequence", store=True, - readonly=True, string="KPI Sequence", ) seq2 = fields.Integer( related="kpi_expression_id.subkpi_id.sequence", store=True, - readonly=True, string="Sub-KPI Sequence", ) diff --git a/mis_builder/models/mis_report.py b/mis_builder/models/mis_report.py index b2a6996ec..49e2b6faf 100644 --- a/mis_builder/models/mis_report.py +++ b/mis_builder/models/mis_report.py @@ -147,18 +147,17 @@ class MisReportKpi(models.Model): _order = "sequence, id" - def name_get(self): - res = [] + @api.depends("description") + def _compute_display_name(self): for rec in self: - name = f"{rec.description} ({rec.name})" - res.append((rec.id, name)) - return res + rec.display_name = f"{rec.description} ({rec.name})" + return rec @api.model def name_search(self, name="", args=None, operator="ilike", limit=100): domain = args or [] domain += ["|", ("name", operator, name), ("description", operator, name)] - return self.search(domain, limit=limit).name_get() + return self.search(domain, limit=limit)._compute_display_name() @api.constrains("name") def _check_name(self): @@ -292,7 +291,7 @@ class MisReportKpiExpression(models.Model): _description = "MIS Report KPI Expression" _order = "sequence, name, id" - sequence = fields.Integer(related="subkpi_id.sequence", store=True, readonly=True) + sequence = fields.Integer(related="subkpi_id.sequence", store=True) name = fields.Char(string="Expression") kpi_id = fields.Many2one("mis.report.kpi", required=True, ondelete="cascade") # TODO FIXME set readonly=True when onchange('subkpi_ids') below works @@ -306,7 +305,14 @@ class MisReportKpiExpression(models.Model): ) ] - def name_get(self): + @api.depends( + "kpi_id.description", + "subkpi_id.description", + "kpi_id.name", + "subkpi_id.name", + "kpi_id.display_name", + ) + def _compute_display_name(self): res = [] for rec in self: kpi = rec.kpi_id @@ -317,7 +323,8 @@ def name_get(self): ) else: name = rec.kpi_id.display_name - res.append((rec.id, name)) + rec.display_name = name + res.append(rec) return res @api.model @@ -354,7 +361,7 @@ def name_search(self, name="", args=None, operator="ilike", limit=100): ] ) domain = osv_expression.AND([domain, name_search_domain]) - return self.search(domain, limit=limit).name_get() + return self.search(domain, limit=limit)._compute_display_name() class MisReportQuery(models.Model): diff --git a/mis_builder/models/mis_report_instance.py b/mis_builder/models/mis_report_instance.py index 45b0c994e..bb33de1f0 100644 --- a/mis_builder/models/mis_report_instance.py +++ b/mis_builder/models/mis_report_instance.py @@ -477,7 +477,7 @@ def _compute_pivot_date(self): _description = "MIS Report Instance" name = fields.Char(required=True, translate=True) - description = fields.Char(related="report_id.description", readonly=True) + description = fields.Char(related="report_id.description") date = fields.Date( string="Base date", help="Report base date " "(leave empty to use current date)" ) @@ -539,12 +539,10 @@ def _compute_pivot_date(self): temporary = fields.Boolean(default=False) source_aml_model_id = fields.Many2one( related="report_id.move_lines_source", - readonly=True, ) source_aml_model_name = fields.Char( related="source_aml_model_id.model", related_sudo=True, - readonly=True, ) analytic_domain = fields.Text( default="[]", diff --git a/mis_builder/readme/CONTRIBUTORS.md b/mis_builder/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..739e3b387 --- /dev/null +++ b/mis_builder/readme/CONTRIBUTORS.md @@ -0,0 +1,29 @@ +- Stéphane Bidoul \<\> +- Laetitia Gangloff \<\> +- Adrien Peiffer \<\> +- Alexis de Lattre \<\> +- Alexandre Fayolle \<\> +- Jordi Ballester \<\> +- Thomas Binsfeld \<\> +- Giovanni Capalbo \<\> +- Marco Calcagni \<\> +- Sébastien Beau \<\> +- Laurent Mignon \<\> +- Luc De Meyer \<\> +- Benjamin Willig \<\> +- Martronic SA \<\> +- nicomacr \<\> +- Juan Jose Scarafia \<\> +- Richard deMeester \<\> +- Eric Caudal \<\> +- Andrea Stirpe \<\> +- Maxence Groine \<\> +- Arnaud Pineux \<\> +- Ernesto Tejeda \<\> +- Pedro M. Baeza \<\> +- Alexey Pelykh \<\> +- Jairo Llopis () +- Dzung Tran \<\> +- Hoang Diep \<\> +- [APSL](): + - Miquel Pascual \<\> diff --git a/mis_builder/readme/CONTRIBUTORS.rst b/mis_builder/readme/CONTRIBUTORS.rst deleted file mode 100644 index 9b28f987b..000000000 --- a/mis_builder/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,27 +0,0 @@ -* Stéphane Bidoul -* Laetitia Gangloff -* Adrien Peiffer -* Alexis de Lattre -* Alexandre Fayolle -* Jordi Ballester -* Thomas Binsfeld -* Giovanni Capalbo -* Marco Calcagni -* Sébastien Beau -* Laurent Mignon -* Luc De Meyer -* Benjamin Willig -* Martronic SA -* nicomacr -* Juan Jose Scarafia -* Richard deMeester -* Eric Caudal -* Andrea Stirpe -* Maxence Groine -* Arnaud Pineux -* Ernesto Tejeda -* Pedro M. Baeza -* Alexey Pelykh -* Jairo Llopis (https://www.moduon.team/) -* Dzung Tran -* Hoang Diep diff --git a/mis_builder/readme/DESCRIPTION.md b/mis_builder/readme/DESCRIPTION.md new file mode 100644 index 000000000..9e47b90d6 --- /dev/null +++ b/mis_builder/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +This module allows you to build Management Information Systems +dashboards. Such style of reports presents KPI in rows and time periods +in columns. Reports mainly fetch data from account moves, but can also +combine data coming from arbitrary Odoo models. Reports can be exported +to PDF, Excel and they can be added to Odoo dashboards. diff --git a/mis_builder/readme/DESCRIPTION.rst b/mis_builder/readme/DESCRIPTION.rst deleted file mode 100644 index 44542643d..000000000 --- a/mis_builder/readme/DESCRIPTION.rst +++ /dev/null @@ -1,5 +0,0 @@ -This module allows you to build Management Information Systems dashboards. -Such style of reports presents KPI in rows and time periods in columns. -Reports mainly fetch data from account moves, but can also combine data coming -from arbitrary Odoo models. Reports can be exported to PDF, Excel and they -can be added to Odoo dashboards. diff --git a/mis_builder/readme/DEVELOP.md b/mis_builder/readme/DEVELOP.md new file mode 100644 index 000000000..a5f537241 --- /dev/null +++ b/mis_builder/readme/DEVELOP.md @@ -0,0 +1,7 @@ +A typical extension is to provide a mechanism to filter reports on +analytic dimensions or operational units. To implement this, you can +override \_get_additional_move_line_filter and \_get_additional_filter +to further filter move lines or queries 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. diff --git a/mis_builder/readme/DEVELOP.rst b/mis_builder/readme/DEVELOP.rst deleted file mode 100644 index 6595dbe2b..000000000 --- a/mis_builder/readme/DEVELOP.rst +++ /dev/null @@ -1,6 +0,0 @@ -A typical extension is to provide a mechanism to filter reports on analytic dimensions -or operational units. To implement this, you can override _get_additional_move_line_filter -and _get_additional_filter to further filter move lines or queries 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. diff --git a/mis_builder/readme/HISTORY.md b/mis_builder/readme/HISTORY.md new file mode 100644 index 000000000..a35346217 --- /dev/null +++ b/mis_builder/readme/HISTORY.md @@ -0,0 +1,542 @@ +## 16.0.5.1.9 (2024-02-09) + +**Bugfixes** + +- Restore compatibility with python 3.9 + ([\#590](https://github.com/OCA/mis-builder/issues/590)) + +## 16.0.5.1.8 (2024-02-08) + +**Bugfixes** + +- Resolve a permission issue when creating report periods with a user + without admin rights. + ([\#596](https://github.com/OCA/mis-builder/issues/596)) + +## 16.0.5.1.0 (2023-04-04) + +**Features** + +- Improve UX by adding the option to edit the pivot date directly on the + view. + +## 16.0.5.0.0 (2023-04-01) + +**Features** + +- Migration to 16.0 + - Addition of a generic filter domain on reports and columns. + - Addition of a search bar to the widget. The corresponding search + view is configurable per report. + - Huge improvement of the widget style. This was long overdue. + - Make the MIS Report menu accessible to the Billing Administrator + group (instead of the hidden Show Full Accounting Features), to + align with the access rules and avoid giving a false sense of + security. This also makes the menu discoverable to new users. + - Removal of analytic fetures because the upstream + `analytic_distribution` mechanism is not compatible; support may be + introduced in separate module, depending on use cases. + - Abandon the `mis_report_filters` context key which had security + implication. It is replaced by a `mis_analytic_domain` context key + which is ANDed with other report-defined filters. + ([\#472](https://github.com/OCA/mis-builder/issues/472)) + - Rename the `get_filter_descriptions_from_context` method to + `get_filter_descriptions`. This method may be overridden to provide + additional subtitles on the PDF or XLS report, representing + user-selected filters. + - The `hide_analytic_filters` has been replaced by + `widget_show_filters`. + - The visibility of the settings button on the widget is now + controlled by a `show_settings_button`. Before it was visible only + for the `account_user` group but this was not flexible enough. + - The widget configuration settings are now grouped in a dedicated + `Widget` tab in the report configuration form. + +**Bugfixes** + +- Fix access error when previewing or printing report. + ([\#415](https://github.com/OCA/mis-builder/issues/415)) + +## 15.0.4.0.5 (2022-07-19) + +**Bugfixes** + +- Support users without timezone. + ([\#388](https://github.com/OCA/mis-builder/issues/388)) + +## 15.0.4.0.4 (2022-07-19) + +**Bugfixes** + +- Allow deleting a report that has subreports. + ([\#431](https://github.com/OCA/mis-builder/issues/431)) + +## 15.0.4.0.2 (2022-02-16) + +**Bugfixes** + +- Fix access right issue when clicking the "Save" button on a MIS Report + Instance form. + ([\#410](https://github.com/OCA/mis-builder/issues/410)) + +## 14.0.4.0.0 (2022-01-08) + +**Features** + +- Remove various field size limits. + ([\#332](https://github.com/OCA/mis-builder/issues/332)) + +**Bugfixes** + +- Support for the Odoo 13+ multi-company model. In multi-company mode, + several allowed companies can be declared on MIS Report instances, and + the report operates on the intersection of report companies and + companies selected in the user context. + ([\#327](https://github.com/OCA/mis-builder/issues/327)) + +- The `get_additional_query_filter` argument of `evaluate()` is now + propagated correctly. + ([\#375](https://github.com/OCA/mis-builder/issues/375)) + +- Use the `parent_state` field of `account.move.line` to filter entries + in `posted` and `draft` state only. Before, when reporting in draft + mode, all entries were used (i.e. there was no filter), and that + started including the cancelled entries/invoices in Odoo 13.+. + + This change also contains a **breaking change** in the internal API. + For quite a while the `target_move argument` of AEP and other methods + was not used by MIS Builder itself and was kept for backward + compatibility. To avoid rippling effects of the necessary change to + use `parent_state`, we now remove this argument. + ([\#377](https://github.com/OCA/mis-builder/issues/377)) + +## 14.0.3.6.7 (2021-06-02) + +**Bugfixes** + +- When on a MIS Report Instance, if you wanted to generate a new line of + type comparison, you couldn't currently select any existing period to + compare. This happened because the field domain was searching in a + NewId context, thus not finding a correct period. Changing the domain + and making it use a computed field with a search for the \_origin + record solves the problem. + ([\#361](https://github.com/OCA/mis-builder/issues/361)) + +## 14.0.3.6.6 (2021-04-23) + +**Bugfixes** + +- Fix drilldown action name when the account model has been customized. + ([\#350](https://github.com/OCA/mis-builder/issues/350)) + +## 14.0.3.6.5 (2021-04-23) + +**Bugfixes** + +- While duplicating a MIS report instance, comparison columns are + ignored because they would raise an error otherwise, as they keep the + old source_cmpcol_from_id and source_cmpcol_to_id from the original + record. ([\#343](https://github.com/OCA/mis-builder/issues/343)) + +## 14.0.3.6.4 (2021-04-06) + +**Features** + +- The drilldown action name displayed on the breadcrumb has been + revised. The kpi description and the account `display_name` are shown + instead of the kpi's technical definition. + ([\#304](https://github.com/OCA/mis-builder/issues/304)) +- Add analytic group filters on report instance, periods and in the + interactive view. + ([\#320](https://github.com/OCA/mis-builder/issues/320)) + +## 13.0.3.6.3 (2020-08-28) + +**Bugfixes** + +- Having a "Compare columns" added on a KPI with an associated style + using a Factor/Divider did lead to the said factor being applied on + the percentages when exporting to XLSX. + ([\#300](https://github.com/OCA/mis-builder/issues/300)) + +**Misc** + +- [\#280](https://github.com/OCA/mis-builder/issues/280), + [\#296](https://github.com/OCA/mis-builder/issues/296) + +## 13.0.3.6.2 (2020-04-22) + +**Bugfixes** + +- The "Settings" button is now displayed for users with the "Show full + accounting features" right when previewing a report. + ([\#281](https://github.com/OCA/mis-builder/issues/281)) + +## 13.0.3.6.1 (2020-04-22) + +**Bugfixes** + +- Fix `TypeError: 'module' object is not iterable` when using budgets by + account. ([\#276](https://github.com/OCA/mis-builder/issues/276)) + +## 13.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 the report-level filters and + cannot be modified in the preview. + ([\#138](https://github.com/OCA/mis-builder/issues/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 a dot-prefix notation. Example: you can define a MIS + Report for a "Balance Sheet", and then have another MIS Report + "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](https://github.com/OCA/mis-builder/issues/155)) + +## 13.0.3.5.0 (2020-01-??) + +Migration to odoo 13.0. + +## 12.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 Many2one relationship with any model that + has a `code` field (not only with `account.account` model). To this + end, the model to be used for Actuals move lines can be configured on + the report template. It can be something else than move lines and the + only constraint is that its `account_id` field has a `code` field. + ([\#149](https://github.com/oca/mis-builder/issues/149)) +- Add `source_aml_model_name` field so extension modules providing + alternative data sources can more easily customize their data source. + ([\#214](https://github.com/oca/mis-builder/issues/214)) +- Support analytic tag filters in the backend view and preview widget. + Selecting several tags in the filter means filtering on move lines + which have *all* these tags set. This is to support the most common + use case of using tags for different dimensions. The filter also makes + a AND with the analytic account filter. + ([\#228](https://github.com/oca/mis-builder/issues/228)) +- Display company in account details rows in multi-company mode. + ([\#242](https://github.com/oca/mis-builder/issues/242)) + +**Bugfixes** + +- Propagate context to xlsx report, so the analytic account filter works + when exporting to xslx too. This also requires a fix to `report_xlsx` + (see ). + ([\#178](https://github.com/oca/mis-builder/issues/178)) +- 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](https://github.com/oca/mis-builder/issues/219)) +- In Excel export, keep the percentage point suffix (pp) instead of + replacing it with %. + ([\#220](https://github.com/oca/mis-builder/issues/220)) + +## 12.0.3.4.0 (2019-07-09) + +**Features** + +- New year-to-date mode for defining periods. + ([\#165](https://github.com/oca/mis-builder/issues/165)) +- Add support for move lines with negative debit or credit. Used by some + for storno accounting. Not officially supported. + ([\#175](https://github.com/oca/mis-builder/issues/175)) +- In Excel export, use a number format with thousands separator. The + specific separator used depends on the Excel configuration (eg + regional settings). + ([\#190](https://github.com/oca/mis-builder/issues/190)) +- Add generation date/time at the end of the XLS export. + ([\#191](https://github.com/oca/mis-builder/issues/191)) +- In presence of Sub KPIs, report more informative user errors when + non-multi expressions yield tuples of incorrect lenght. + ([\#196](https://github.com/oca/mis-builder/issues/196)) + +**Bugfixes** + +- Fix rendering of percentage types in Excel export. + ([\#192](https://github.com/oca/mis-builder/issues/192)) + +## 12.0.3.3.0 (2019-01-26) + +**Features** + +*Dynamic analytic filters in report preview are not yet available in 11, +this requires an update to the JS widget that proved difficult to +implement so far. Help welcome.* + +- Analytic account filters. On a report, an analytic account can be + selected for filtering. The filter will be applied to move lines + queries. A filter box is also available in the widget to let the user + select the analytic account during report preview. + ([\#15](https://github.com/oca/mis-builder/issues/15)) +- Control visibility of analytic filter combo box in widget. This is + useful to hide the analytic filters on reports where they do not make + sense, such as balance sheet reports. + ([\#42](https://github.com/oca/mis-builder/issues/42)) +- Display analytic filters in the header of exported pdf and xls. + ([\#44](https://github.com/oca/mis-builder/issues/44)) +- Replace the last old gtk icons with fontawesome icons. + ([\#104](https://github.com/oca/mis-builder/issues/104)) +- Use active_test=False in AEP queries. This is important for reports + involving inactive taxes. This should not negatively effect existing + reports, because an accounting report must take into account all + existing move lines even if they reference objects such as taxes, + journals, accounts types that have been deactivated since their + creation. ([\#107](https://github.com/oca/mis-builder/issues/107)) +- int(), float() and round() support for AccountingNone. + ([\#108](https://github.com/oca/mis-builder/issues/108)) +- Allow referencing subkpis by name by writing kpi_x.subkpi_y in + expressions. ([\#114](https://github.com/oca/mis-builder/issues/114)) +- Add an option to control the display of the start/end dates in the + column headers. It is disabled by default (this is a change compared + to previous behaviour). + ([\#118](https://github.com/oca/mis-builder/issues/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](https://github.com/oca/mis-builder/issues/123)) + +**Bugs** + +- In the style form, hide the "Hide always" checkbox when "Hide always + inherit" is checked, as for all other syle elements. + ([\#121](https://github.com/OCA/mis-builder/pull/121)) + +**Upgrading from 3.2 (breaking changes)** + +If you use `Actuals (alternative)` data source in combination with +analytic filters, the underlying model must now have an +`analytic_account_id` field. + +## 11.0.3.2.2 (2018-06-30) + +- \[FIX\] Fix bug in company_default_get call returning id instead of + recordset ([\#103](https://github.com/OCA/mis-builder/pull/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](https://github.com/OCA/mis-builder/issues/46)) + +## 11.0.3.2.1 (2018-05-29) + +- \[FIX\] Missing comparison operator for AccountingNone leading to + errors in pbal computations + ([\#93](https://github.com/OCA/mis-builder/issue/93)) + +## 10.0.3.2.0 (2018-05-02) + +- \[FIX\] make subkpi ordering deterministic + ([\#71](https://github.com/OCA/mis-builder/issues/71)) +- \[ADD\] report instance level option to disable account expansion, + enabling the creation of detailed templates while deferring the + decision of rendering the details or not to the report instance + ([\#74](https://github.com/OCA/mis-builder/issues/74)) +- \[ADD\] pbal and nbal accounting expressions, to sum positive and + negative balances respectively (ie ignoring accounts with negative, + resp positive balances) + ([\#86](https://github.com/OCA/mis-builder/issues/86)) + +## 11.0.3.1.2 (2018-02-04) + +Migration to Odoo 11. No new feature. +([\#67](https://github.com/OCA/mis-builder/pull/67)) + +## 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](https://github.com/OCA/mis-builder/issues/2)) +- \[ADD\] multi-company consolidation support, with currency conversion + (the conversion rate date is the end of the reporting period) + ([\#7](https://github.com/OCA/mis-builder/issues/7), + [\#3](https://github.com/OCA/mis-builder/issues/3)) +- \[ADD\] provide ref, datetime, dateutil, time, user in the evaluation + context of move line domains; among other things, this allows using + references to xml ids (such as account types or tax tags) when + querying move lines + ([\#26](https://github.com/OCA/mis-builder/issues/26)). +- \[ADD\] extended account selectors: you can now select accounts using + any domain on account.account, not only account codes + `balp[('account_type', '=', 'asset_receivable')]` + ([\#4](https://github.com/OCA/mis-builder/issues/4)). +- \[IMP\] in the report instance configuration form, the filters are now + grouped in a notebook page, this improves readability and + extensibility ([\#39](https://github.com/OCA/mis-builder/issues/39)). + +Bug fixes: + +- \[FIX\] fix error when saving periods in comparison mode on newly + created (not yet saved) report instances. + [\#50](https://github.com/OCA/mis-builder/pull/50) +- \[FIX\] improve display of Base Date report instance view. + [\#51](https://github.com/OCA/mis-builder/pull/51) + +Upgrading from 3.0 (breaking changes): + +- Alternative move line data sources must have a company_id field. + +## 10.0.3.0.4 (2017-10-14) + +Bug fix: + +- \[FIX\] issue with initial balance rounding. + [\#30](https://github.com/OCA/mis-builder/issues/30) + +## 10.0.3.0.3 (2017-10-03) + +Bug fix: + +- \[FIX\] fix error saving KPI on newly created reports. + [\#18](https://github.com/OCA/mis-builder/issues/18) + +## 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 on any 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. +- \[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 the reporting time period (the basis + for budget item, but could also server other purposes, such as + manually entering some 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 a given 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 dateutil modules + +Main bug fixes: + +- \[FIX\] deletion of templates and reports (cascade and retricts) + () +- \[FIX\] copy of reports + () +- \[FIX\] better error message when periods have wrong/missing dates + () +- \[FIX\] xlsx export of string types KPI + () +- \[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 + +## 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. + +## 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. + +## 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 API changing merged in urgency before + it is used by other modules. + +## 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 + () +- \[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 not make sense in this case +- \[CHG\] The divider suffix (k, M, etc) is not inserted automatically + anymore because it is inconsistent when working with prefixes; you + need to add it manually in the suffix +- \[IMP\] AccountingExpressionProcessor now supports 'balu' expressions + to obtain the unallocated profit/loss of previous 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 available through 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 different values +- \[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.0.1.0.0 (2016-04-27) + +- The copy of a MIS Report Instance now copies period. + +- The copy of a MIS Report Template now copies KPIs and queries. + +- Usability: the default view for MIS Report instances is now the + rendered preview, and the settings are accessible through a gear icon + in the list view and a button in the preview. + +- Display blank cells instead of 0.0 when there is no data. + +- Usability: better layout of the MIS Report periods settings on small + screens. +- Include the download buttons inside the MIS Builder widget, and + refactor the widget to open the door to analytic filtering in the + previews. + +- Add KPI rendering prefixes (so you can print \$ in front of the + value). +- Add hooks for analytic filtering. + + + +## 8.0.0.2.0 + +Pre-history. Or rather, you need to look at the git log. diff --git a/mis_builder/readme/HISTORY.rst b/mis_builder/readme/HISTORY.rst deleted file mode 100644 index e725110d1..000000000 --- a/mis_builder/readme/HISTORY.rst +++ /dev/null @@ -1,539 +0,0 @@ -16.0.5.1.9 (2024-02-09) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Restore compatibility with python 3.9 (`#590 `_) - - -16.0.5.1.8 (2024-02-08) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Resolve a permission issue when creating report periods with a user without admin rights. (`#596 `_) - - -16.0.5.1.0 (2023-04-04) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Improve UX by adding the option to edit the pivot date directly on the view. - -16.0.5.0.0 (2023-04-01) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Migration to 16.0 - - - Addition of a generic filter domain on reports and columns. - - Addition of a search bar to the widget. The corresponding search view is configurable - per report. - - Huge improvement of the widget style. This was long overdue. - - Make the MIS Report menu accessible to the Billing Administrator group - (instead of the hidden Show Full Accounting Features), to align with the access rules - and avoid giving a false sense of security. This also makes the menu discoverable to - new users. - - Removal of analytic fetures because the upstream ``analytic_distribution`` mechanism - is not compatible; support may be introduced in separate module, depending on use - cases. - - Abandon the ``mis_report_filters`` context key which had security implication. - It is replaced by a ``mis_analytic_domain`` context key which is ANDed with other - report-defined filters. (`#472 `_) - - Rename the ``get_filter_descriptions_from_context`` method to - ``get_filter_descriptions``. This method may be overridden to provide additional - subtitles on the PDF or XLS report, representing user-selected filters. - - The ``hide_analytic_filters`` has been replaced by ``widget_show_filters``. - - The visibility of the settings button on the widget is now controlled by a - ``show_settings_button``. Before it was visible only for the ``account_user`` group - but this was not flexible enough. - - The widget configuration settings are now grouped in a dedicated ``Widget`` tab in - the report configuration form. - -**Bugfixes** - -- Fix access error when previewing or printing report. (`#415 `_) - - -15.0.4.0.5 (2022-07-19) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Support users without timezone. (`#388 `_) - - -15.0.4.0.4 (2022-07-19) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Allow deleting a report that has subreports. (`#431 `_) - - -15.0.4.0.2 (2022-02-16) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Fix access right issue when clicking the "Save" button on a MIS Report Instance form. (`#410 `_) - - -14.0.4.0.0 (2022-01-08) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Remove various field size limits. (`#332 `_) - - -**Bugfixes** - -- Support for the Odoo 13+ multi-company model. In multi-company mode, several allowed - companies can be declared on MIS Report instances, and the report operates on the - intersection of report companies and companies selected in the user context. (`#327 `_) -- The ``get_additional_query_filter`` argument of ``evaluate()`` is now propagated - correctly. (`#375 `_) -- Use the ``parent_state`` field of ``account.move.line`` to filter entries in ``posted`` - and ``draft`` state only. Before, when reporting in draft mode, all entries were used - (i.e. there was no filter), and that started including the cancelled entries/invoices in - Odoo 13.+. - - This change also contains a **breaking change** in the internal API. For quite a while - the ``target_move argument`` of AEP and other methods was not used by MIS Builder itself - and was kept for backward compatibility. To avoid rippling effects of the necessary - change to use ``parent_state``, we now remove this argument. (`#377 `_) - - -14.0.3.6.7 (2021-06-02) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- When on a MIS Report Instance, if you wanted to generate a new line of type comparison, you couldn't currently select any existing period to compare. - This happened because the field domain was searching in a NewId context, thus not finding a correct period. - Changing the domain and making it use a computed field with a search for the _origin record solves the problem. (`#361 `_) - - -14.0.3.6.6 (2021-04-23) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Fix drilldown action name when the account model has been customized. (`#350 `_) - - -14.0.3.6.5 (2021-04-23) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- While duplicating a MIS report instance, comparison columns are ignored because - they would raise an error otherwise, as they keep the old source_cmpcol_from_id - and source_cmpcol_to_id from the original record. (`#343 `_) - - -14.0.3.6.4 (2021-04-06) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- The drilldown action name displayed on the breadcrumb has been revised. - The kpi description and the account ``display_name`` are shown instead - of the kpi's technical definition. (`#304 `_) -- Add analytic group filters on report instance, periods and in the interactive - view. (`#320 `_) - - -13.0.3.6.3 (2020-08-28) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Having a "Compare columns" added on a KPI with an associated style using a - Factor/Divider did lead to the said factor being applied on the percentages - when exporting to XLSX. (`#300 `_) - - -**Misc** - -- `#280 `_, `#296 `_ - - -13.0.3.6.2 (2020-04-22) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- The "Settings" button is now displayed for users with the "Show full accounting features" right when previewing a report. (`#281 `_) - - -13.0.3.6.1 (2020-04-22) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Fix ``TypeError: 'module' object is not iterable`` when using - budgets by account. (`#276 `_) - - -13.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 the report-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 a dot-prefix - notation. Example: you can define a MIS Report for a "Balance Sheet", and then - have another MIS Report "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 `_) - - -13.0.3.5.0 (2020-01-??) -~~~~~~~~~~~~~~~~~~~~~~~ - -Migration to odoo 13.0. - -12.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 Many2one - relationship with any model that has a ``code`` field (not only with - ``account.account`` model). To this end, the model to be used for Actuals - move lines can be configured on the report template. It can be something else - than move 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 more easily customize their data source. (`#214 `_) -- Support analytic tag filters in the backend view and preview widget. - Selecting several tags in the filter means filtering on move lines which - have *all* these tags set. This is to support the most common use case of - using tags for 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** - -- Propagate context to xlsx report, so the analytic account filter - works when exporting to xslx too. This also requires a fix to - ``report_xlsx`` (see https://github.com/OCA/reporting-engine/pull/259). (`#178 `_) -- 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 `_) - - -12.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 officially supported. (`#175 `_) -- In Excel export, use a number format with thousands separator. The - specific separator used depends on the Excel 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 incorrect lenght. (`#196 `_) - - -**Bugfixes** - -- Fix rendering of percentage types in Excel export. (`#192 `_) - - -12.0.3.3.0 (2019-01-26) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -*Dynamic analytic filters in report preview are not yet available in 11, -this requires an update to the JS widget that proved difficult to implement -so far. Help welcome.* - -- Analytic account filters. On a report, an analytic - account can be selected for filtering. The filter will - be applied to move lines queries. A filter box is also - available in the widget to let the user select the analytic - account during report preview. (`#15 `_) -- Control visibility of analytic filter combo box in widget. - This is useful to hide the analytic filters on reports where - 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 not negatively effect existing reports, because - an accounting report must take into account all existing move lines - even if they reference objects such as taxes, journals, accounts types - that have been deactivated since their creation. (`#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 (this is 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 syle elements. (`#121 _`) - -**Upgrading from 3.2 (breaking changes)** - -If you use ``Actuals (alternative)`` data source in combination with analytic -filters, the underlying model must now have an ``analytic_account_id`` field. - - -11.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 `_) - -11.0.3.2.1 (2018-05-29) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [FIX] Missing comparison operator for AccountingNone - leading to errors in pbal computations - (`#93 `_) - -10.0.3.2.0 (2018-05-02) -~~~~~~~~~~~~~~~~~~~~~~~ - -* [FIX] make subkpi ordering deterministic - (`#71 `_) -* [ADD] report instance level option to disable account expansion, - enabling the creation of detailed templates while 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 ignoring accounts with negative, - resp positive balances) - (`#86 `_) - -11.0.3.1.2 (2018-02-04) -~~~~~~~~~~~~~~~~~~~~~~~ - -Migration to Odoo 11. No new feature. -(`#67 `_) - -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 of the reporting period) - (`#7 `_, - `#3 `_) -* [ADD] provide ref, datetime, dateutil, time, user in the evaluation - context of move line domains; among other things, 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 account.account, not only account codes - ``balp[('account_type', '=', 'asset_receivable')]`` - (`#4 `_). -* [IMP] in the report instance configuration form, the filters are - now grouped in a notebook page, this improves readability 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. - -10.0.3.0.4 (2017-10-14) -~~~~~~~~~~~~~~~~~~~~~~~ - -Bug fix: - -* [FIX] issue with initial balance rounding. - `#30 `_ - -10.0.3.0.3 (2017-10-03) -~~~~~~~~~~~~~~~~~~~~~~~ - -Bug fix: - -* [FIX] fix error saving KPI on newly created reports. - `#18 `_ - -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 on any 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. -* [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 the reporting time period (the basis - for budget item, but could also server other purposes, such as manually - entering some 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 a given 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 dateutil modules - -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 - -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. - -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. - -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 API changing merged in - urgency before it is used by other modules. - -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 not make sense in this case -* [CHG] The divider suffix (k, M, etc) is not inserted automatically anymore - because it is inconsistent when working with prefixes; you need to add it - manually in the suffix -* [IMP] AccountingExpressionProcessor now supports 'balu' expressions - to obtain the unallocated profit/loss of previous 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 available through 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 different values -* [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.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 -* 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 are accessible 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 analytic filtering 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.0.0.2.0 -~~~~~~~~~ - -Pre-history. Or rather, you need to look at the git log. diff --git a/mis_builder/readme/INSTALL.md b/mis_builder/readme/INSTALL.md new file mode 100644 index 000000000..1a313a586 --- /dev/null +++ b/mis_builder/readme/INSTALL.md @@ -0,0 +1,7 @@ +Your preferred way to install addons will work with MIS Builder. + +An easy way to install it with all its dependencies is using pip: + +- `pip install --pre odoo12-addon-mis_builder` +- then restart Odoo, update the addons list in your database, and + install the MIS Builder application. diff --git a/mis_builder/readme/INSTALL.rst b/mis_builder/readme/INSTALL.rst deleted file mode 100644 index 7b0f57714..000000000 --- a/mis_builder/readme/INSTALL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Your preferred way to install addons will work with MIS Builder. - -An easy way to install it with all its dependencies is using pip: - -* ``pip install --pre odoo12-addon-mis_builder`` -* then restart Odoo, update the addons list in your database, and install - the MIS Builder application. diff --git a/mis_builder/readme/ROADMAP.md b/mis_builder/readme/ROADMAP.md new file mode 100644 index 000000000..4a70d78f2 --- /dev/null +++ b/mis_builder/readme/ROADMAP.md @@ -0,0 +1,5 @@ +The mis_builder +[roadmap](https://github.com/OCA/mis-builder/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) +and [known +issues](https://github.com/OCA/mis-builder/issues?q=is%3Aopen+is%3Aissue+label%3Abug) +can be found on GitHub. diff --git a/mis_builder/readme/ROADMAP.rst b/mis_builder/readme/ROADMAP.rst deleted file mode 100644 index 085352cdb..000000000 --- a/mis_builder/readme/ROADMAP.rst +++ /dev/null @@ -1,3 +0,0 @@ -The mis_builder `roadmap `_ -and `known issues `_ can -be found on GitHub. diff --git a/mis_builder/readme/USAGE.md b/mis_builder/readme/USAGE.md new file mode 100644 index 000000000..abf04212b --- /dev/null +++ b/mis_builder/readme/USAGE.md @@ -0,0 +1,19 @@ +To configure this module, you need to: + +- Go to Accounting \> Configuration \> MIS Reporting \> MIS Report + Templates where you can create report templates by defining KPI's. + KPI's constitute the rows of your reports. Such report templates are + time independent. + +![](https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_template.png) + +- Then in Accounting \> Reports \> MIS Reporting \> MIS Reports you can + create report instance by binding the templates to time periods, hence + defining the columns of your reports. + +![](https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_settings.png) + +- From the MIS Reports view, you can preview the report, add it to and + Odoo dashboard, and export it to PDF or Excel. + +![](https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_preview.png) diff --git a/mis_builder/readme/USAGE.rst b/mis_builder/readme/USAGE.rst deleted file mode 100644 index 19383ac2b..000000000 --- a/mis_builder/readme/USAGE.rst +++ /dev/null @@ -1,26 +0,0 @@ -To configure this module, you need to: - -* Go to Accounting > Configuration > MIS Reporting > MIS Report Templates where - you can create report templates by defining KPI's. KPI's constitute the rows of your - reports. Such report templates are time independent. - -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_template.png - :alt: Sample report template - :width: 80 % - :align: center - -* Then in Accounting > Reports > MIS Reporting > MIS Reports you can create report instance by - binding the templates to time periods, hence defining the columns of your reports. - -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_settings.png - :alt: Sample report configuration - :width: 80 % - :align: center - -* From the MIS Reports view, you can preview the report, add it to and Odoo dashboard, - and export it to PDF or Excel. - -.. figure:: https://raw.githubusercontent.com/OCA/mis-builder/10.0/mis_builder/static/description/ex_report_preview.png - :alt: Sample preview - :width: 80 % - :align: center diff --git a/mis_builder/static/description/index.html b/mis_builder/static/description/index.html index a402eb7c1..c54e64049 100644 --- a/mis_builder/static/description/index.html +++ b/mis_builder/static/description/index.html @@ -1,3 +1,4 @@ + @@ -8,10 +9,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +276,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +302,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,12 +370,12 @@

MIS Builder

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a3bce2b0c8cf7b32a0a827b8e5a50bb39fea7acaa9784549c3a25217226624aa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/mis-builder Translate me on Weblate Try me on Runboat

-

This module allows you to build Management Information Systems dashboards. -Such style of reports presents KPI in rows and time periods in columns. -Reports mainly fetch data from account moves, but can also combine data coming -from arbitrary Odoo models. Reports can be exported to PDF, Excel and they -can be added to Odoo dashboards.

+

Production/Stable License: AGPL-3 OCA/mis-builder Translate me on Weblate Try me on Runboat

+

This module allows you to build Management Information Systems +dashboards. Such style of reports presents KPI in rows and time periods +in columns. Reports mainly fetch data from account moves, but can also +combine data coming from arbitrary Odoo models. Reports can be exported +to PDF, Excel and they can be added to Odoo dashboards.

Table of contents

    @@ -433,50 +435,49 @@

    Installation

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

    • pip install --pre odoo12-addon-mis_builder
    • -
    • then restart Odoo, update the addons list in your database, and install -the MIS Builder application.
    • +
    • then restart Odoo, update the addons list in your database, and +install the MIS Builder application.

Usage

To configure this module, you need to:

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

image1

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

image2

    -
  • From the MIS Reports view, you can preview the report, add it to and Odoo dashboard, -and export it to PDF or Excel.
  • +
  • From the MIS Reports view, you can preview the report, add it to and +Odoo dashboard, and export it to PDF or Excel.
-
-Sample preview -
+

image3

Development

-

A typical extension is to provide a mechanism to filter reports on analytic dimensions -or operational units. To implement this, you can override _get_additional_move_line_filter -and _get_additional_filter to further filter move lines or queries 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.

+

A typical extension is to provide a mechanism to filter reports on +analytic dimensions or operational units. To implement this, you can +override _get_additional_move_line_filter and _get_additional_filter +to further filter move lines or queries 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.

Known issues / Roadmap

-

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

+

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

Changelog

@@ -484,21 +485,25 @@

Changelog

16.0.5.1.9 (2024-02-09)

Bugfixes

    -
  • Restore compatibility with python 3.9 (#590)
  • +
  • Restore compatibility with python 3.9 +(#590)

16.0.5.1.8 (2024-02-08)

Bugfixes

    -
  • Resolve a permission issue when creating report periods with a user without admin rights. (#596)
  • +
  • Resolve a permission issue when creating report periods with a user +without admin rights. +(#596)

16.0.5.1.0 (2023-04-04)

Features

    -
  • Improve UX by adding the option to edit the pivot date directly on the view.
  • +
  • Improve UX by adding the option to edit the pivot date directly on +the view.
@@ -507,80 +512,96 @@

16.0.5.0.0 (2023-04-01)

  • Migration to 16.0
    • Addition of a generic filter domain on reports and columns.
    • -
    • Addition of a search bar to the widget. The corresponding search view is configurable -per report.
    • +
    • Addition of a search bar to the widget. The corresponding search +view is configurable per report.
    • Huge improvement of the widget style. This was long overdue.
    • -
    • Make the MIS Report menu accessible to the Billing Administrator group -(instead of the hidden Show Full Accounting Features), to align with the access rules -and avoid giving a false sense of security. This also makes the menu discoverable to -new users.
    • -
    • Removal of analytic fetures because the upstream analytic_distribution mechanism -is not compatible; support may be introduced in separate module, depending on use -cases.
    • -
    • Abandon the mis_report_filters context key which had security implication. -It is replaced by a mis_analytic_domain context key which is ANDed with other -report-defined filters. (#472)
    • +
    • Make the MIS Report menu accessible to the Billing Administrator +group (instead of the hidden Show Full Accounting Features), to +align with the access rules and avoid giving a false sense of +security. This also makes the menu discoverable to new users.
    • +
    • Removal of analytic fetures because the upstream +analytic_distribution mechanism is not compatible; support may +be introduced in separate module, depending on use cases.
    • +
    • Abandon the mis_report_filters context key which had security +implication. It is replaced by a mis_analytic_domain context +key which is ANDed with other report-defined filters. +(#472)
    • Rename the get_filter_descriptions_from_context method to -get_filter_descriptions. This method may be overridden to provide additional -subtitles on the PDF or XLS report, representing user-selected filters.
    • -
    • The hide_analytic_filters has been replaced by widget_show_filters.
    • -
    • The visibility of the settings button on the widget is now controlled by a -show_settings_button. Before it was visible only for the account_user group -but this was not flexible enough.
    • -
    • The widget configuration settings are now grouped in a dedicated Widget tab in -the report configuration form.
    • +get_filter_descriptions. This method may be overridden to +provide additional subtitles on the PDF or XLS report, +representing user-selected filters. +
    • The hide_analytic_filters has been replaced by +widget_show_filters.
    • +
    • The visibility of the settings button on the widget is now +controlled by a show_settings_button. Before it was visible +only for the account_user group but this was not flexible +enough.
    • +
    • The widget configuration settings are now grouped in a dedicated +Widget tab in the report configuration form.

Bugfixes

    -
  • Fix access error when previewing or printing report. (#415)
  • +
  • Fix access error when previewing or printing report. +(#415)

15.0.4.0.5 (2022-07-19)

Bugfixes

    -
  • Support users without timezone. (#388)
  • +
  • Support users without timezone. +(#388)

15.0.4.0.4 (2022-07-19)

Bugfixes

    -
  • Allow deleting a report that has subreports. (#431)
  • +
  • Allow deleting a report that has subreports. +(#431)

15.0.4.0.2 (2022-02-16)

Bugfixes

    -
  • Fix access right issue when clicking the “Save” button on a MIS Report Instance form. (#410)
  • +
  • Fix access right issue when clicking the “Save” button on a MIS +Report Instance form. +(#410)

14.0.4.0.0 (2022-01-08)

Features

    -
  • Remove various field size limits. (#332)
  • +
  • Remove various field size limits. +(#332)

Bugfixes

    -
  • Support for the Odoo 13+ multi-company model. In multi-company mode, several allowed -companies can be declared on MIS Report instances, and the report operates on the -intersection of report companies and companies selected in the user context. (#327)

    +
  • Support for the Odoo 13+ multi-company model. In multi-company mode, +several allowed companies can be declared on MIS Report instances, +and the report operates on the intersection of report companies and +companies selected in the user context. +(#327)

  • -
  • The get_additional_query_filter argument of evaluate() is now propagated -correctly. (#375)

    +
  • The get_additional_query_filter argument of evaluate() is now +propagated correctly. +(#375)

  • -
  • Use the parent_state field of account.move.line to filter entries in posted -and draft state only. Before, when reporting in draft mode, all entries were used -(i.e. there was no filter), and that started including the cancelled entries/invoices in +

  • Use the parent_state field of account.move.line to filter +entries in posted and draft state only. Before, when +reporting in draft mode, all entries were used (i.e. there was no +filter), and that started including the cancelled entries/invoices in Odoo 13.+.

    -

    This change also contains a breaking change in the internal API. For quite a while -the target_move argument of AEP and other methods was not used by MIS Builder itself -and was kept for backward compatibility. To avoid rippling effects of the necessary -change to use parent_state, we now remove this argument. (#377)

    +

    This change also contains a breaking change in the internal API. +For quite a while the target_move argument of AEP and other +methods was not used by MIS Builder itself and was kept for backward +compatibility. To avoid rippling effects of the necessary change to +use parent_state, we now remove this argument. +(#377)

@@ -588,80 +609,96 @@

14.0.4.0.0 (2022-01-08)

14.0.3.6.7 (2021-06-02)

Bugfixes

    -
  • When on a MIS Report Instance, if you wanted to generate a new line of type comparison, you couldn’t currently select any existing period to compare. -This happened because the field domain was searching in a NewId context, thus not finding a correct period. -Changing the domain and making it use a computed field with a search for the _origin record solves the problem. (#361)
  • +
  • When on a MIS Report Instance, if you wanted to generate a new line +of type comparison, you couldn’t currently select any existing period +to compare. This happened because the field domain was searching in a +NewId context, thus not finding a correct period. Changing the domain +and making it use a computed field with a search for the _origin +record solves the problem. +(#361)

14.0.3.6.6 (2021-04-23)

Bugfixes

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

14.0.3.6.5 (2021-04-23)

Bugfixes

    -
  • While duplicating a MIS report instance, comparison columns are ignored because -they would raise an error otherwise, as they keep the old source_cmpcol_from_id -and source_cmpcol_to_id from the original record. (#343)
  • +
  • While duplicating a MIS report instance, comparison columns are +ignored because they would raise an error otherwise, as they keep the +old source_cmpcol_from_id and source_cmpcol_to_id from the original +record. (#343)

14.0.3.6.4 (2021-04-06)

Features

    -
  • The drilldown action name displayed on the breadcrumb has been revised. -The kpi description and the account display_name are shown instead -of the kpi’s technical definition. (#304)
  • -
  • Add analytic group filters on report instance, periods and in the interactive -view. (#320)
  • +
  • The drilldown action name displayed on the breadcrumb has been +revised. The kpi description and the account display_name are +shown instead of the kpi’s technical definition. +(#304)
  • +
  • Add analytic group filters on report instance, periods and in the +interactive view. +(#320)

13.0.3.6.3 (2020-08-28)

Bugfixes

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

Misc

13.0.3.6.2 (2020-04-22)

Bugfixes

    -
  • The “Settings” button is now displayed for users with the “Show full accounting features” right when previewing a report. (#281)
  • +
  • The “Settings” button is now displayed for users with the “Show full +accounting features” right when previewing a report. +(#281)

13.0.3.6.1 (2020-04-22)

Bugfixes

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

13.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 the report-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 a dot-prefix -notation. Example: you can define a MIS Report for a “Balance Sheet”, and then -have another MIS Report “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)
  • +
  • Add column-level filters on analytic account and analytic tags. These +filters are combined with a AND with the report-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 a dot-prefix notation. Example: you can define a MIS +Report for a “Balance Sheet”, and then have another MIS Report +“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)
@@ -673,109 +710,132 @@

12.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 Many2one -relationship with any model that has a code field (not only with -account.account model). To this end, the model to be used for Actuals -move lines can be configured on the report template. It can be something else -than move lines and the only constraint is that its account_id field -has a code field. (#149)
  • +in the Period form can now be a Many2one relationship with any model +that has a code field (not only with account.account model). +To this end, the model to be used for Actuals move lines can be +configured on the report template. It can be something else than move +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 more easily customize their data source. (#214)
  • +alternative data sources can more easily customize their data source. +(#214)
  • Support analytic tag filters in the backend view and preview widget. -Selecting several tags in the filter means filtering on move lines which -have all these tags set. This is to support the most common use case of -using tags for 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)
  • +Selecting several tags in the filter means filtering on move lines +which have all these tags set. This is to support the most common +use case of using tags for 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

  • Propagate context to xlsx report, so the analytic account filter works when exporting to xslx too. This also requires a fix to -report_xlsx (see https://github.com/OCA/reporting-engine/pull/259). (#178)
  • -
  • 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)
  • +report_xlsx (see +https://github.com/OCA/reporting-engine/pull/259). +(#178) +
  • 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)

12.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 officially supported. (#175)
  • +
  • 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 officially supported. +(#175)
  • In Excel export, use a number format with thousands separator. The -specific separator used depends on the Excel configuration (eg regional -settings). (#190)
  • -
  • Add generation date/time at the end of the XLS export. (#191)
  • +specific separator used depends on the Excel 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 incorrect lenght. (#196)
  • +non-multi expressions yield tuples of incorrect lenght. +(#196)

Bugfixes

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

12.0.3.3.0 (2019-01-26)

Features

Dynamic analytic filters in report preview are not yet available in 11, -this requires an update to the JS widget that proved difficult to implement -so far. Help welcome.

+this requires an update to the JS widget that proved difficult to +implement so far. Help welcome.

    -
  • Analytic account filters. On a report, an analytic -account can be selected for filtering. The filter will -be applied to move lines queries. A filter box is also -available in the widget to let the user select the analytic -account during report preview. (#15)
  • -
  • Control visibility of analytic filter combo box in widget. -This is useful to hide the analytic filters on reports where -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 not negatively effect existing reports, because -an accounting report must take into account all existing move lines -even if they reference objects such as taxes, journals, accounts types -that have been deactivated since their creation. (#107)
  • -
  • int(), float() and round() support for AccountingNone. (#108)
  • -
  • Allow referencing subkpis by name by writing kpi_x.subkpi_y in expressions. (#114)
  • +
  • Analytic account filters. On a report, an analytic account can be +selected for filtering. The filter will be applied to move lines +queries. A filter box is also available in the widget to let the user +select the analytic account during report preview. +(#15)
  • +
  • Control visibility of analytic filter combo box in widget. This is +useful to hide the analytic filters on reports where 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 not negatively effect existing +reports, because an accounting report must take into account all +existing move lines even if they reference objects such as taxes, +journals, accounts types that have been deactivated since their +creation. (#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 (this is 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)
  • +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 syle elements. (#121 <https://github.com/OCA/mis-builder/pull/121>_)
  • +
  • In the style form, hide the “Hide always” checkbox when “Hide always +inherit” is checked, as for all other syle elements. +(#121)

Upgrading from 3.2 (breaking changes)

-

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

+

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

11.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)
  • +
  • [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)

11.0.3.2.1 (2018-05-29)

    -
  • [FIX] Missing comparison operator for AccountingNone -leading to errors in pbal computations +
  • [FIX] Missing comparison operator for AccountingNone leading to +errors in pbal computations (#93)
@@ -785,11 +845,11 @@

10.0.3.2.0 (2018-05-02)

  • [FIX] make subkpi ordering deterministic (#71)
  • [ADD] report instance level option to disable account expansion, -enabling the creation of detailed templates while deferring the decision -of rendering the details or not to the report instance +enabling the creation of detailed templates while 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 ignoring accounts with negative, +
  • [ADD] pbal and nbal accounting expressions, to sum positive and +negative balances respectively (ie ignoring accounts with negative, resp positive balances) (#86)
  • @@ -803,8 +863,8 @@

    11.0.3.1.2 (2018-02-04)

    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. +
    • [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 of the reporting period) @@ -819,8 +879,8 @@

      10.0.3.1.1 (2017-11-14)

      any domain on account.account, not only account codes balp[('account_type', '=', 'asset_receivable')] (#4).
    • -
    • [IMP] in the report instance configuration form, the filters are -now grouped in a notebook page, this improves readability and +
    • [IMP] in the report instance configuration form, the filters are now +grouped in a notebook page, this improves readability and extensibility (#39).
    @@ -857,29 +917,29 @@

    10.0.3.0.3 (2017-10-03)

    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 on any 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.
    • -
    • [ADD] Sum column source, to create columns that add/subtract -other columns.
    • +
    • [ADD] Alternative move line source per report column. This makes mis +buidler accounting expressions work on any 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.
    • +
    • [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 the reporting time period (the basis -for budget item, but could also server other purposes, such as manually -entering some KPI values, such as number of employee)
    • +supporting automatic ajustment to the reporting time period (the +basis for budget item, but could also server other purposes, such as +manually entering some 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 a given P&L -acount, to implement budget control)
    • +
    • [IMP] new AEP method to get accounts involved in an expression (this +is useful to find which KPI relate to a given 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 dateutil modules
    • +
    • [IMP] add the column date_from, date_to in expression evaluation +context, as well as time, datetime and dateutil modules

    Main bug fixes:

      @@ -894,7 +954,8 @@

      10.0.3.0.2 (2017-10-01)

    • [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
    • +
    • [FIX] permission issue when adding report to dashboard with non admin +user
    @@ -902,8 +963,8 @@

    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
    • +
    • [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
    • @@ -914,15 +975,16 @@

      10.0.2.0.3 (unreleased)

      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.
      • +
      • [IMP] Widget code changes to allow to add fields in the widget more +easily.

    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 API changing merged in -urgency before it is used by other modules.
    • +
    • [IMP] remove unused argument in declare_and_compute_period() for a +cleaner API. This is a breaking API changing merged in urgency before +it is used by other modules.
    @@ -931,44 +993,46 @@

    9.0.2.0.0 (2016-05-24)

    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
    • +
    • [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 not make sense in this case
    • -
    • [CHG] The divider suffix (k, M, etc) is not inserted automatically anymore -because it is inconsistent when working with prefixes; you need to add it -manually in the suffix
    • +
    • [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 not make sense in this case
    • +
    • [CHG] The divider suffix (k, M, etc) is not inserted automatically +anymore because it is inconsistent when working with prefixes; you +need to add it manually in the suffix
    • [IMP] AccountingExpressionProcessor now supports ‘balu’ expressions to obtain the unallocated profit/loss of previous 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] 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 available through a “Last Reports Generated” -menu, they are garbaged collected automatically, unless saved permanently, -which can be done using a Save button
    • +reports are deemed temporary and available through 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 different values
    • +
    • [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 different values
    • [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
    • +
    • [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
    @@ -980,19 +1044,19 @@

    8.0.1.0.0 (2016-04-27)

    https://github.com/OCA/account-financial-reporting/pull/181
  • 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 are accessible through a gear icon in the list view and -a button in the preview. +
  • Usability: the default view for MIS Report instances is now the +rendered preview, and the settings are accessible 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 analytic filtering 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
  • +
  • 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 analytic filtering 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
  • @@ -1008,7 +1072,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -1049,18 +1113,24 @@

    Contributors

  • Jairo Llopis (https://www.moduon.team/)
  • Dzung Tran <dungtd@trobz.com>
  • Hoang Diep <hoang@trobz.com>
  • +
  • APSL: +
  • Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    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.

    Current maintainer:

    sbidoul

    -

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

    +

    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.

    diff --git a/mis_builder/static/src/components/mis_report_widget.esm.js b/mis_builder/static/src/components/mis_report_widget.esm.js index d67fbcc81..94df950d9 100644 --- a/mis_builder/static/src/components/mis_report_widget.esm.js +++ b/mis_builder/static/src/components/mis_report_widget.esm.js @@ -2,9 +2,9 @@ import {Component, onWillStart, useState, useSubEnv} from "@odoo/owl"; import {useBus, useService} from "@web/core/utils/hooks"; -import {DatePicker} from "@web/core/datepicker/datepicker"; -import {FilterMenu} from "@web/search/filter_menu/filter_menu"; +import {DateTimePicker} from "@web/core/datetime/datetime_picker"; import {SearchBar} from "@web/search/search_bar/search_bar"; +import {SearchBarMenu} from "@web/search/search_bar_menu/search_bar_menu"; import {SearchModel} from "@web/search/search_model"; import {parseDate} from "@web/core/l10n/dates"; import {registry} from "@web/core/registry"; @@ -176,7 +176,11 @@ export class MisReportWidget extends Component { } } -MisReportWidget.components = {FilterMenu, SearchBar, DatePicker}; +MisReportWidget.components = {SearchBarMenu, SearchBar, DateTimePicker}; MisReportWidget.template = "mis_builder.MisReportWidget"; -registry.category("fields").add("mis_report_widget", MisReportWidget); +export const misReportWidget = { + component: MisReportWidget, +}; + +registry.category("fields").add("mis_report_widget", misReportWidget); diff --git a/mis_builder/static/src/components/mis_report_widget.xml b/mis_builder/static/src/components/mis_report_widget.xml index c5e2206b4..cb003e0e2 100644 --- a/mis_builder/static/src/components/mis_report_widget.xml +++ b/mis_builder/static/src/components/mis_report_widget.xml @@ -1,7 +1,7 @@ - +
    @@ -13,8 +13,7 @@
    - - @@ -119,11 +119,7 @@ - + @@ -134,7 +130,7 @@ name="expression_ids" colspan="2" nolabel="1" - attrs="{'invisible': [('multi', '=', False)]}" + invisible="not multi" > @@ -157,7 +153,7 @@ diff --git a/mis_builder/views/mis_report_instance.xml b/mis_builder/views/mis_report_instance.xml index f13fce50e..46deb1cb2 100644 --- a/mis_builder/views/mis_report_instance.xml +++ b/mis_builder/views/mis_report_instance.xml @@ -82,14 +82,14 @@ name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="fa-plus" - attrs="{'invisible': [('temporary', '=', True)]}" + invisible="temporary" />
    @@ -113,26 +113,20 @@ - + - + @@ -144,7 +138,7 @@ name="period_ids" nolabel="1" colspan="4" - attrs="{'required': [('comparison_mode', '=', True)]}" + required="comparison_mode" context="{'default_report_instance_id': id}" > @@ -169,13 +163,14 @@ @@ -311,7 +306,7 @@ @@ -323,12 +318,13 @@ @@ -343,18 +339,20 @@ @@ -364,20 +362,14 @@ - + - + @@ -387,23 +379,13 @@ - + - - + + @@ -412,7 +394,7 @@ name="analytic_domain" widget="domain" options="{'model': 'source_aml_model_name'}" - attrs="{'invisible': [('source_aml_model_name', '=', False)]}" + invisible="not source_aml_model_name" /> diff --git a/mis_builder/views/mis_report_style.xml b/mis_builder/views/mis_report_style.xml index 480f617e3..d1379e648 100644 --- a/mis_builder/views/mis_report_style.xml +++ b/mis_builder/views/mis_report_style.xml @@ -20,75 +20,41 @@ - + - + - + - + - + - + - + - + - + - + - +