From 2818639758253e58834d6857ae2ac56d0c33f8f6 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Tue, 27 Aug 2024 17:00:34 +0100 Subject: [PATCH 1/2] [MIG] mis_builder_budget: pre-commit auto fixes --- mis_builder_budget/README.rst | 182 +++++++++--------- mis_builder_budget/__manifest__.py | 9 +- mis_builder_budget/readme/CONTRIBUTORS.md | 5 + mis_builder_budget/readme/CONTRIBUTORS.rst | 5 - mis_builder_budget/readme/DESCRIPTION.md | 8 + mis_builder_budget/readme/DESCRIPTION.rst | 7 - mis_builder_budget/readme/HISTORY.md | 94 +++++++++ mis_builder_budget/readme/HISTORY.rst | 104 ---------- mis_builder_budget/readme/ROADMAP.md | 5 + mis_builder_budget/readme/ROADMAP.rst | 3 - mis_builder_budget/readme/USAGE.md | 36 ++++ mis_builder_budget/readme/USAGE.rst | 33 ---- .../static/description/index.html | 127 ++++++------ 13 files changed, 321 insertions(+), 297 deletions(-) create mode 100644 mis_builder_budget/readme/CONTRIBUTORS.md delete mode 100644 mis_builder_budget/readme/CONTRIBUTORS.rst create mode 100644 mis_builder_budget/readme/DESCRIPTION.md delete mode 100644 mis_builder_budget/readme/DESCRIPTION.rst create mode 100644 mis_builder_budget/readme/HISTORY.md delete mode 100644 mis_builder_budget/readme/HISTORY.rst create mode 100644 mis_builder_budget/readme/ROADMAP.md delete mode 100644 mis_builder_budget/readme/ROADMAP.rst create mode 100644 mis_builder_budget/readme/USAGE.md delete mode 100644 mis_builder_budget/readme/USAGE.rst diff --git a/mis_builder_budget/README.rst b/mis_builder_budget/README.rst index 0eb9e75df..e0e314da4 100644 --- a/mis_builder_budget/README.rst +++ b/mis_builder_budget/README.rst @@ -17,24 +17,25 @@ MIS Builder Budget :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_budget + :target: https://github.com/OCA/mis-builder/tree/17.0/mis_builder_budget :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_budget + :target: https://translation.odoo-community.org/projects/mis-builder-17-0/mis-builder-17-0-mis_builder_budget :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| Create budgets for MIS reports. -This module lets you create budgets for any MIS report. Several budgets can be -created for a given report template (ie one budget per year). Budget figures -are provided by KPI or by GL account, with different time periods. A budget can -then be selected as a data source for a MIS report column, and the report will -show the budgeted values for each KPI, adjusted for the period of the column. +This module lets you create budgets for any MIS report. Several budgets +can be created for a given report template (ie one budget per year). +Budget figures are provided by KPI or by GL account, with different time +periods. A budget can then be selected as a data source for a MIS report +column, and the report will show the budgeted values for each KPI, +adjusted for the period of the column. **Table of contents** @@ -44,152 +45,161 @@ show the budgeted values for each KPI, adjusted for the period of the column. Usage ===== -There are two ways to use this module: create budgets by KPI or budgets by -GL accounts. Currently, the two methods cannot be combined in the same budget. +There are two ways to use this module: create budgets by KPI or budgets +by GL accounts. Currently, the two methods cannot be combined in the +same budget. **Budget by KPIs** -To use this this mode, you first need to flag at least some KPI in a MIS report -to be budgetable. You also need to configure the accumulation method on the KPI -according to their type. +To use this this mode, you first need to flag at least some KPI in a MIS +report to be budgetable. You also need to configure the accumulation +method on the KPI according to their type. The accumulation method determines how budgeted values spanning over a time period are transformed to match the reporting period. -* Sum: values of shorter period are added, values of longest or partially overlapping - periods are adjusted pro-rata temporis (eg monetary amount such as revenue). -* Average: values of included period are averaged with a pro-rata temporis weight. - Typically used for values that do not accumulate over time (eg a number of employees). +- Sum: values of shorter period are added, values of longest or + partially overlapping periods are adjusted pro-rata temporis (eg + monetary amount such as revenue). +- Average: values of included period are averaged with a pro-rata + temporis weight. Typically used for values that do not accumulate + over time (eg a number of employees). -When KPI are configured, you need to create a budget, using the MIS Budget (by -KPIs) menu, then click on the budget items button to create or import the -budgeted amounts for all your KPI and time periods. +When KPI are configured, you need to create a budget, using the MIS +Budget (by KPIs) menu, then click on the budget items button to create +or import the budgeted amounts for all your KPI and time periods. **Budget by GL accounts** You can also create budgets by GL accounts. In this case, the budget is -populated with one line per GL account (and optionally analytic account and/or -tags) and time period. +populated with one line per GL account (and optionally analytic account +and/or tags) and time period. **Add budget columns to report instances** Finally, a column (aka period) must be added to a MIS report instance, -selecting your newly created budget as a data source. The data will be adjusted -to the reporting period when displayed. Columns can be compared by adding a -column of type "comparison" or "sum". +selecting your newly created budget as a data source. The data will be +adjusted to the reporting period when displayed. Columns can be compared +by adding a column of type "comparison" or "sum". 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.0.0 (2023-04-01) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Migration to 16.0. - - - removal of analytic fetures because the upstream ``analytic_distribution`` mechanism - is not compatible; support may be introduced in separate module, depending on use - cases (`#472 `_) +- Migration to 16.0. + - removal of analytic fetures because the upstream + ``analytic_distribution`` mechanism is not compatible; support may + be introduced in separate module, depending on use cases + (`#472 `__) **Bugfixes** -- Fix display of budgets in presence of sub KPIs. (`#428 `_) - +- Fix display of budgets in presence of sub KPIs. + (`#428 `__) 14.0.4.0.0 (2022-01-08) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- A label field has been added to MIS Budget by Account items. When overlap between budget - items is allowed this allows creating a budget with several contributions for a given - account. (`#382 `_) -- The balance field on MIS Budget by Account items is now writeable. This allows for - easier data entry and import. (`#383 `_) -- MIS Budget by Account can now be configured to allow budget items with overlapping - dates. Each overlapping item contributes to the budget of the corresponding period. (`#384 `_) - +- A label field has been added to MIS Budget by Account items. When + overlap between budget items is allowed this allows creating a budget + with several contributions for a given account. + (`#382 `__) +- The balance field on MIS Budget by Account items is now writeable. + This allows for easier data entry and import. + (`#383 `__) +- MIS Budget by Account can now be configured to allow budget items + with overlapping dates. Each overlapping item contributes to the + budget of the corresponding period. + (`#384 `__) 14.0.3.5.1 (2021-04-06) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Fix incorrect budget by account multi company security rules. (`#347 `_) - +- Fix incorrect budget by account multi company security rules. + (`#347 `__) 13.0.3.5.0 (2020-03-28) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Budget by GL account: allow budgeting by GL account in addition to the - existing mechanism to budget by KPI. Budget items have a begin and end - date, and when reporting a pro-rata temporis adjustment is made to match - the reporting period. (`#259 `_) - +- Budget by GL account: allow budgeting by GL account in addition to + the existing mechanism to budget by KPI. Budget items have a begin + and end date, and when reporting a pro-rata temporis adjustment is + made to match the reporting period. + (`#259 `__) 13.0.3.4.0 (2020-01-??) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Migration to odoo 13.0. 12.0.3.4.0 (2019-10-26) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Consider analytic tags too when detecting overlapping budget items. - Previously only analytic account was considered, and this overlap detection - mechanism was overlooked when analytic tags were added to budget items. (`#241 `_) - +- Consider analytic tags too when detecting overlapping budget items. + Previously only analytic account was considered, and this overlap + detection mechanism was overlooked when analytic tags were added to + budget items. + (`#241 `__) 11.0.3.3.0 (2019-01-13) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Support analytic filters. (`#15 `_) - +- Support analytic filters. + (`#15 `__) 11.0.3.2.1 (2018-06-30) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -- [IMP] Support analytic tags in budget items - (`#100 `_) +- [IMP] Support analytic tags in budget items + (`#100 `__) 11.0.3.2.0 (2018-05-02) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -- [FIX] #NAME error in out-of-order computation of non - budgetable items in budget columns - (`#68 `_) +- [FIX] #NAME error in out-of-order computation of non budgetable items + in budget columns + (`#68 `__) 11.0.3.1.1 (2018-02-04) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Migration to Odoo 11. No new feature. -(`#67 `_) +(`#67 `__) 10.0.3.1.0 (2017-11-14) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- New features: -- [ADD] multi-company record rule for MIS Budgets - (`#27 `_) +- [ADD] multi-company record rule for MIS Budgets + (`#27 `__) 10.0.1.1.1 (2017-10-01) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- First version. @@ -199,7 +209,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. @@ -207,21 +217,21 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Stéphane Bidoul -* Adrien Peiffer -* Benjamin Willig -* Artem Kostyuk -* Dzung Tran +- Stéphane Bidoul +- Adrien Peiffer +- Benjamin Willig +- Artem Kostyuk +- Dzung Tran Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -241,6 +251,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_budget/__manifest__.py b/mis_builder_budget/__manifest__.py index 4c2283a9f..6b3a383a3 100644 --- a/mis_builder_budget/__manifest__.py +++ b/mis_builder_budget/__manifest__.py @@ -3,11 +3,10 @@ { "name": "MIS Builder Budget", - "summary": """ - Create budgets for MIS reports""", - "version": "16.0.5.0.2", + "summary": "Create budgets for MIS reports", + "version": "17.0.1.0.0", "license": "AGPL-3", - "author": "ACSONE SA/NV, " "Odoo Community Association (OCA)", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/mis-builder", "depends": ["mis_builder", "account"], "data": [ @@ -22,7 +21,7 @@ "security/mis_budget_by_account.xml", "views/mis_budget_by_account.xml", ], - "installable": False, + "installable": True, "development_status": "Production/Stable", "maintainers": ["sbidoul"], } diff --git a/mis_builder_budget/readme/CONTRIBUTORS.md b/mis_builder_budget/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..b3e04b159 --- /dev/null +++ b/mis_builder_budget/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Stéphane Bidoul \<\> +- Adrien Peiffer \<\> +- Benjamin Willig \<\> +- Artem Kostyuk \<\> +- Dzung Tran \<\> diff --git a/mis_builder_budget/readme/CONTRIBUTORS.rst b/mis_builder_budget/readme/CONTRIBUTORS.rst deleted file mode 100644 index a99312914..000000000 --- a/mis_builder_budget/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,5 +0,0 @@ -* Stéphane Bidoul -* Adrien Peiffer -* Benjamin Willig -* Artem Kostyuk -* Dzung Tran diff --git a/mis_builder_budget/readme/DESCRIPTION.md b/mis_builder_budget/readme/DESCRIPTION.md new file mode 100644 index 000000000..d17c85a27 --- /dev/null +++ b/mis_builder_budget/readme/DESCRIPTION.md @@ -0,0 +1,8 @@ +Create budgets for MIS reports. + +This module lets you create budgets for any MIS report. Several budgets +can be created for a given report template (ie one budget per year). +Budget figures are provided by KPI or by GL account, with different time +periods. A budget can then be selected as a data source for a MIS report +column, and the report will show the budgeted values for each KPI, +adjusted for the period of the column. diff --git a/mis_builder_budget/readme/DESCRIPTION.rst b/mis_builder_budget/readme/DESCRIPTION.rst deleted file mode 100644 index 02a4e3f68..000000000 --- a/mis_builder_budget/readme/DESCRIPTION.rst +++ /dev/null @@ -1,7 +0,0 @@ -Create budgets for MIS reports. - -This module lets you create budgets for any MIS report. Several budgets can be -created for a given report template (ie one budget per year). Budget figures -are provided by KPI or by GL account, with different time periods. A budget can -then be selected as a data source for a MIS report column, and the report will -show the budgeted values for each KPI, adjusted for the period of the column. diff --git a/mis_builder_budget/readme/HISTORY.md b/mis_builder_budget/readme/HISTORY.md new file mode 100644 index 000000000..294914322 --- /dev/null +++ b/mis_builder_budget/readme/HISTORY.md @@ -0,0 +1,94 @@ +## 16.0.5.0.0 (2023-04-01) + +**Features** + +- Migration to 16.0. + - removal of analytic fetures because the upstream + `analytic_distribution` mechanism is not compatible; support may be + introduced in separate module, depending on use cases + ([\#472](https://github.com/OCA/mis-builder/issues/472)) + +**Bugfixes** + +- Fix display of budgets in presence of sub KPIs. + ([\#428](https://github.com/OCA/mis-builder/issues/428)) + +## 14.0.4.0.0 (2022-01-08) + +**Features** + +- A label field has been added to MIS Budget by Account items. When + overlap between budget items is allowed this allows creating a budget + with several contributions for a given account. + ([\#382](https://github.com/OCA/mis-builder/issues/382)) +- The balance field on MIS Budget by Account items is now writeable. + This allows for easier data entry and import. + ([\#383](https://github.com/OCA/mis-builder/issues/383)) +- MIS Budget by Account can now be configured to allow budget items with + overlapping dates. Each overlapping item contributes to the budget of + the corresponding period. + ([\#384](https://github.com/OCA/mis-builder/issues/384)) + +## 14.0.3.5.1 (2021-04-06) + +**Bugfixes** + +- Fix incorrect budget by account multi company security rules. + ([\#347](https://github.com/OCA/mis-builder/issues/347)) + +## 13.0.3.5.0 (2020-03-28) + +**Features** + +- Budget by GL account: allow budgeting by GL account in addition to the + existing mechanism to budget by KPI. Budget items have a begin and end + date, and when reporting a pro-rata temporis adjustment is made to + match the reporting period. + ([\#259](https://github.com/OCA/mis-builder/issues/259)) + +## 13.0.3.4.0 (2020-01-??) + +Migration to odoo 13.0. + +## 12.0.3.4.0 (2019-10-26) + +**Bugfixes** + +- Consider analytic tags too when detecting overlapping budget items. + Previously only analytic account was considered, and this overlap + detection mechanism was overlooked when analytic tags were added to + budget items. ([\#241](https://github.com/oca/mis-builder/issues/241)) + +## 11.0.3.3.0 (2019-01-13) + +**Features** + +- Support analytic filters. + ([\#15](https://github.com/oca/mis-builder/issues/15)) + +## 11.0.3.2.1 (2018-06-30) + +- \[IMP\] Support analytic tags in budget items + ([\#100](https://github.com/OCA/mis-builder/pull/100)) + +## 11.0.3.2.0 (2018-05-02) + +- \[FIX\] \#NAME error in out-of-order computation of non budgetable + items in budget columns + ([\#68](https://github.com/OCA/mis-builder/pull/69)) + +## 11.0.3.1.1 (2018-02-04) + +Migration to Odoo 11. No new feature. +([\#67](https://github.com/OCA/mis-builder/pull/67)) + +## 10.0.3.1.0 (2017-11-14) + +New features: + +- \[ADD\] multi-company record rule for MIS Budgets + ([\#27](https://github.com/OCA/mis-builder/issues/27)) + +## 10.0.1.1.1 (2017-10-01) + +First version. diff --git a/mis_builder_budget/readme/HISTORY.rst b/mis_builder_budget/readme/HISTORY.rst deleted file mode 100644 index bfb2e4604..000000000 --- a/mis_builder_budget/readme/HISTORY.rst +++ /dev/null @@ -1,104 +0,0 @@ -16.0.5.0.0 (2023-04-01) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Migration to 16.0. - - - removal of analytic fetures because the upstream ``analytic_distribution`` mechanism - is not compatible; support may be introduced in separate module, depending on use - cases (`#472 `_) - - -**Bugfixes** - -- Fix display of budgets in presence of sub KPIs. (`#428 `_) - - -14.0.4.0.0 (2022-01-08) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- A label field has been added to MIS Budget by Account items. When overlap between budget - items is allowed this allows creating a budget with several contributions for a given - account. (`#382 `_) -- The balance field on MIS Budget by Account items is now writeable. This allows for - easier data entry and import. (`#383 `_) -- MIS Budget by Account can now be configured to allow budget items with overlapping - dates. Each overlapping item contributes to the budget of the corresponding period. (`#384 `_) - - -14.0.3.5.1 (2021-04-06) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Fix incorrect budget by account multi company security rules. (`#347 `_) - - -13.0.3.5.0 (2020-03-28) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Budget by GL account: allow budgeting by GL account in addition to the - existing mechanism to budget by KPI. Budget items have a begin and end - date, and when reporting a pro-rata temporis adjustment is made to match - the reporting period. (`#259 `_) - - -13.0.3.4.0 (2020-01-??) -~~~~~~~~~~~~~~~~~~~~~~~ - -Migration to odoo 13.0. - -12.0.3.4.0 (2019-10-26) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Consider analytic tags too when detecting overlapping budget items. - Previously only analytic account was considered, and this overlap detection - mechanism was overlooked when analytic tags were added to budget items. (`#241 `_) - - -11.0.3.3.0 (2019-01-13) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Support analytic filters. (`#15 `_) - - -11.0.3.2.1 (2018-06-30) -~~~~~~~~~~~~~~~~~~~~~~~ - -- [IMP] Support analytic tags in budget items - (`#100 `_) - -11.0.3.2.0 (2018-05-02) -~~~~~~~~~~~~~~~~~~~~~~~ - -- [FIX] #NAME error in out-of-order computation of non - budgetable items in budget columns - (`#68 `_) - -11.0.3.1.1 (2018-02-04) -~~~~~~~~~~~~~~~~~~~~~~~ - -Migration to Odoo 11. No new feature. -(`#67 `_) - -10.0.3.1.0 (2017-11-14) -~~~~~~~~~~~~~~~~~~~~~~~ - -New features: - -- [ADD] multi-company record rule for MIS Budgets - (`#27 `_) - -10.0.1.1.1 (2017-10-01) -~~~~~~~~~~~~~~~~~~~~~~~ - -First version. diff --git a/mis_builder_budget/readme/ROADMAP.md b/mis_builder_budget/readme/ROADMAP.md new file mode 100644 index 000000000..4a70d78f2 --- /dev/null +++ b/mis_builder_budget/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_budget/readme/ROADMAP.rst b/mis_builder_budget/readme/ROADMAP.rst deleted file mode 100644 index 085352cdb..000000000 --- a/mis_builder_budget/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_budget/readme/USAGE.md b/mis_builder_budget/readme/USAGE.md new file mode 100644 index 000000000..ea76dd792 --- /dev/null +++ b/mis_builder_budget/readme/USAGE.md @@ -0,0 +1,36 @@ +There are two ways to use this module: create budgets by KPI or budgets +by GL accounts. Currently, the two methods cannot be combined in the +same budget. + +**Budget by KPIs** + +To use this this mode, you first need to flag at least some KPI in a MIS +report to be budgetable. You also need to configure the accumulation +method on the KPI according to their type. + +The accumulation method determines how budgeted values spanning over a +time period are transformed to match the reporting period. + +- Sum: values of shorter period are added, values of longest or + partially overlapping periods are adjusted pro-rata temporis (eg + monetary amount such as revenue). +- Average: values of included period are averaged with a pro-rata + temporis weight. Typically used for values that do not accumulate over + time (eg a number of employees). + +When KPI are configured, you need to create a budget, using the MIS +Budget (by KPIs) menu, then click on the budget items button to create +or import the budgeted amounts for all your KPI and time periods. + +**Budget by GL accounts** + +You can also create budgets by GL accounts. In this case, the budget is +populated with one line per GL account (and optionally analytic account +and/or tags) and time period. + +**Add budget columns to report instances** + +Finally, a column (aka period) must be added to a MIS report instance, +selecting your newly created budget as a data source. The data will be +adjusted to the reporting period when displayed. Columns can be compared +by adding a column of type "comparison" or "sum". diff --git a/mis_builder_budget/readme/USAGE.rst b/mis_builder_budget/readme/USAGE.rst deleted file mode 100644 index 5c8092cf2..000000000 --- a/mis_builder_budget/readme/USAGE.rst +++ /dev/null @@ -1,33 +0,0 @@ -There are two ways to use this module: create budgets by KPI or budgets by -GL accounts. Currently, the two methods cannot be combined in the same budget. - -**Budget by KPIs** - -To use this this mode, you first need to flag at least some KPI in a MIS report -to be budgetable. You also need to configure the accumulation method on the KPI -according to their type. - -The accumulation method determines how budgeted values spanning over a -time period are transformed to match the reporting period. - -* Sum: values of shorter period are added, values of longest or partially overlapping - periods are adjusted pro-rata temporis (eg monetary amount such as revenue). -* Average: values of included period are averaged with a pro-rata temporis weight. - Typically used for values that do not accumulate over time (eg a number of employees). - -When KPI are configured, you need to create a budget, using the MIS Budget (by -KPIs) menu, then click on the budget items button to create or import the -budgeted amounts for all your KPI and time periods. - -**Budget by GL accounts** - -You can also create budgets by GL accounts. In this case, the budget is -populated with one line per GL account (and optionally analytic account and/or -tags) and time period. - -**Add budget columns to report instances** - -Finally, a column (aka period) must be added to a MIS report instance, -selecting your newly created budget as a data source. The data will be adjusted -to the reporting period when displayed. Columns can be compared by adding a -column of type "comparison" or "sum". diff --git a/mis_builder_budget/static/description/index.html b/mis_builder_budget/static/description/index.html index 35b25ab22..d7bea15c6 100644 --- a/mis_builder_budget/static/description/index.html +++ b/mis_builder_budget/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,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. @@ -275,7 +275,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 } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,13 +369,14 @@

MIS Builder Budget

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:ae54cfc3d390dd5240d9a2931e6e444756b9d061f64d9e4a9f4e7bc33dac6015 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

Create budgets for MIS reports.

-

This module lets you create budgets for any MIS report. Several budgets can be -created for a given report template (ie one budget per year). Budget figures -are provided by KPI or by GL account, with different time periods. A budget can -then be selected as a data source for a MIS report column, and the report will -show the budgeted values for each KPI, adjusted for the period of the column.

+

This module lets you create budgets for any MIS report. Several budgets +can be created for a given report template (ie one budget per year). +Budget figures are provided by KPI or by GL account, with different time +periods. A budget can then be selected as a data source for a MIS report +column, and the report will show the budgeted values for each KPI, +adjusted for the period of the column.

Table of contents

    @@ -407,38 +408,43 @@

    MIS Builder Budget

Usage

-

There are two ways to use this module: create budgets by KPI or budgets by -GL accounts. Currently, the two methods cannot be combined in the same budget.

+

There are two ways to use this module: create budgets by KPI or budgets +by GL accounts. Currently, the two methods cannot be combined in the +same budget.

Budget by KPIs

-

To use this this mode, you first need to flag at least some KPI in a MIS report -to be budgetable. You also need to configure the accumulation method on the KPI -according to their type.

+

To use this this mode, you first need to flag at least some KPI in a MIS +report to be budgetable. You also need to configure the accumulation +method on the KPI according to their type.

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

    -
  • Sum: values of shorter period are added, values of longest or partially overlapping -periods are adjusted pro-rata temporis (eg monetary amount such as revenue).
  • -
  • Average: values of included period are averaged with a pro-rata temporis weight. -Typically used for values that do not accumulate over time (eg a number of employees).
  • +
  • Sum: values of shorter period are added, values of longest or +partially overlapping periods are adjusted pro-rata temporis (eg +monetary amount such as revenue).
  • +
  • Average: values of included period are averaged with a pro-rata +temporis weight. Typically used for values that do not accumulate +over time (eg a number of employees).
-

When KPI are configured, you need to create a budget, using the MIS Budget (by -KPIs) menu, then click on the budget items button to create or import the -budgeted amounts for all your KPI and time periods.

+

When KPI are configured, you need to create a budget, using the MIS +Budget (by KPIs) menu, then click on the budget items button to create +or import the budgeted amounts for all your KPI and time periods.

Budget by GL accounts

You can also create budgets by GL accounts. In this case, the budget is -populated with one line per GL account (and optionally analytic account and/or -tags) and time period.

+populated with one line per GL account (and optionally analytic account +and/or tags) and time period.

Add budget columns to report instances

Finally, a column (aka period) must be added to a MIS report instance, -selecting your newly created budget as a data source. The data will be adjusted -to the reporting period when displayed. Columns can be compared by adding a -column of type “comparison” or “sum”.

+selecting your newly created budget as a data source. The data will be +adjusted to the reporting period when displayed. Columns can be compared +by adding a column of type “comparison” or “sum”.

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

@@ -447,45 +453,53 @@

16.0.5.0.0 (2023-04-01)

Features

  • Migration to 16.0.
      -
    • removal of analytic fetures because the upstream analytic_distribution mechanism -is not compatible; support may be introduced in separate module, depending on use -cases (#472)
    • +
    • removal of analytic fetures because the upstream +analytic_distribution mechanism is not compatible; support may +be introduced in separate module, depending on use cases +(#472)

Bugfixes

    -
  • Fix display of budgets in presence of sub KPIs. (#428)
  • +
  • Fix display of budgets in presence of sub KPIs. +(#428)

14.0.4.0.0 (2022-01-08)

Features

    -
  • A label field has been added to MIS Budget by Account items. When overlap between budget -items is allowed this allows creating a budget with several contributions for a given -account. (#382)
  • -
  • The balance field on MIS Budget by Account items is now writeable. This allows for -easier data entry and import. (#383)
  • -
  • MIS Budget by Account can now be configured to allow budget items with overlapping -dates. Each overlapping item contributes to the budget of the corresponding period. (#384)
  • +
  • A label field has been added to MIS Budget by Account items. When +overlap between budget items is allowed this allows creating a budget +with several contributions for a given account. +(#382)
  • +
  • The balance field on MIS Budget by Account items is now writeable. +This allows for easier data entry and import. +(#383)
  • +
  • MIS Budget by Account can now be configured to allow budget items +with overlapping dates. Each overlapping item contributes to the +budget of the corresponding period. +(#384)

14.0.3.5.1 (2021-04-06)

Bugfixes

    -
  • Fix incorrect budget by account multi company security rules. (#347)
  • +
  • Fix incorrect budget by account multi company security rules. +(#347)

13.0.3.5.0 (2020-03-28)

Features

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

12.0.3.4.0 (2019-10-26)

Bugfixes

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

11.0.3.3.0 (2019-01-13)

Features

    -
  • Support analytic filters. (#15)
  • +
  • Support analytic filters. +(#15)
@@ -518,8 +535,8 @@

11.0.3.2.1 (2018-06-30)

11.0.3.2.0 (2018-05-02)

    -
  • [FIX] #NAME error in out-of-order computation of non -budgetable items in budget columns +
  • [FIX] #NAME error in out-of-order computation of non budgetable items +in budget columns (#68)
@@ -546,7 +563,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.

@@ -570,13 +587,15 @@

Contributors

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.

From 98deed349314e91ebbf57d6f755f77a66bdf1810 Mon Sep 17 00:00:00 2001 From: Antonio Buric Date: Mon, 22 Jul 2024 14:12:46 +0200 Subject: [PATCH 2/2] [MIG] mis_builder_budget: Migration to 17.0 --- .pre-commit-config.yaml | 1 - .../models/mis_budget_by_account_item.py | 2 -- mis_builder_budget/models/mis_budget_item.py | 2 +- .../models/mis_budget_item_abstract.py | 6 ++---- mis_builder_budget/views/mis_budget.xml | 6 +++--- mis_builder_budget/views/mis_budget_by_account.xml | 12 ++++++++---- .../views/mis_budget_by_account_item.xml | 6 +++--- mis_builder_budget/views/mis_budget_item.xml | 8 ++++---- .../views/mis_report_instance_period.xml | 6 ++++-- 9 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 578c3513e..aafee5e1f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,6 @@ exclude: | (?x) # NOT INSTALLABLE ADDONS - ^mis_builder_budget/| ^mis_builder_demo/| # END NOT INSTALLABLE ADDONS # Files and folders generated by bots, to avoid loops diff --git a/mis_builder_budget/models/mis_budget_by_account_item.py b/mis_builder_budget/models/mis_budget_by_account_item.py index 0d228f712..72d8e83b7 100644 --- a/mis_builder_budget/models/mis_budget_by_account_item.py +++ b/mis_builder_budget/models/mis_budget_by_account_item.py @@ -23,14 +23,12 @@ class MisBudgetByAccountItem(models.Model): company_id = fields.Many2one( "res.company", related="budget_id.company_id", - readonly=True, store=True, ) company_currency_id = fields.Many2one( "res.currency", related="budget_id.company_id.currency_id", string="Company Currency", - readonly=True, help="Utility field to express amount currency", store=True, ) diff --git a/mis_builder_budget/models/mis_budget_item.py b/mis_builder_budget/models/mis_budget_item.py index 9a7d63b50..6cf636d2a 100644 --- a/mis_builder_budget/models/mis_budget_item.py +++ b/mis_builder_budget/models/mis_budget_item.py @@ -11,7 +11,7 @@ class MisBudgetItem(models.Model): _order = "budget_id, date_from, seq1, seq2" budget_id = fields.Many2one(comodel_name="mis.budget") - report_id = fields.Many2one(related="budget_id.report_id", readonly=True) + report_id = fields.Many2one(related="budget_id.report_id") kpi_expression_id = fields.Many2one( domain=( "[('kpi_id.report_id', '=', report_id)," diff --git a/mis_builder_budget/models/mis_budget_item_abstract.py b/mis_builder_budget/models/mis_budget_item_abstract.py index f1816b010..36cbc7bdc 100644 --- a/mis_builder_budget/models/mis_budget_item_abstract.py +++ b/mis_builder_budget/models/mis_budget_item_abstract.py @@ -17,11 +17,9 @@ class MisBudgetItemAbstract(models.AbstractModel): index=True, ) budget_date_from = fields.Date( - related="budget_id.date_from", readonly=True, string="Budget Date From" - ) - budget_date_to = fields.Date( - related="budget_id.date_to", readonly=True, string="Budget Date To" + related="budget_id.date_from", string="Budget Date From" ) + budget_date_to = fields.Date(related="budget_id.date_to", string="Budget Date To") date_range_id = fields.Many2one( comodel_name="date.range", domain="[('date_start', '>=', budget_date_from)," diff --git a/mis_builder_budget/views/mis_budget.xml b/mis_builder_budget/views/mis_budget.xml index 7b128c9dd..1bdc38b4f 100644 --- a/mis_builder_budget/views/mis_budget.xml +++ b/mis_builder_budget/views/mis_budget.xml @@ -12,20 +12,20 @@ name="action_draft" string="Set draft" type="object" - attrs="{'invisible': [('state', '=', 'draft')]}" + invisible="state == 'draft'" />