==================
MIS Builder Budget
==================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:0370960192fc8c12bed52a1784d2ab43f9b670adcd8d268f5b3081f43914e4f2
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
    :target: https://odoo-community.org/page/development-status
    :alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
    :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
    :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
    :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
    :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.

**Table of contents**

.. contents::
   :local:

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.

**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".

Known issues / Roadmap
======================

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.

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 <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.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/mis-builder/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 <https://github.com/OCA/mis-builder/issues/new?body=module:%20mis_builder_budget%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~

* Stéphane Bidoul <stephane.bidoul@acsone.eu>
* Adrien Peiffer <adrien.peiffer@acsone.eu>
* Benjamin Willig <benjamin.willig@acsone.eu>
* Artem Kostyuk <a.kostyuk@mobilunity.com>
* Dzung Tran <dungtd@trobz.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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.

.. |maintainer-sbidoul| image:: https://github.com/sbidoul.png?size=40px
    :target: https://github.com/sbidoul
    :alt: sbidoul

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sbidoul| 

This module is part of the `OCA/mis-builder <https://github.com/OCA/mis-builder/tree/16.0/mis_builder_budget>`_ project on GitHub.

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