Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] mis_builder_cash_flow: Migration to version 16.0 #1049

Merged
merged 27 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
89e7721
[12.0][ADD] mis_builder_cash_flow module
jjscarafia Oct 1, 2019
4836c5c
[IMP] mis_builder_cash_flow: Add tests
etobella Oct 11, 2019
fe01e7e
[FIX] cash_flow: forecast accumulate next columns
jjscarafia Nov 28, 2019
b75d8c9
Added translation using Weblate (Portuguese)
alvarorib Feb 26, 2020
2af5dff
Added translation using Weblate (Catalan)
CarlesAntoli Feb 27, 2020
cba30cb
Added translation using Weblate (Spanish)
CarlesAntoli Feb 27, 2020
cf91032
[IMP] include partner_id in mis builder cash flow
amcor Mar 26, 2020
06135f5
[IMP] partner_id in forecastline
amcor Mar 27, 2020
bf19d4f
Translated using Weblate (Portuguese)
alvarorib Apr 7, 2020
0faad64
[IMP] mis_builder_cash_flow: black, isort, prettier
MiquelRForgeFlow Apr 23, 2020
cb8d548
[MIG] mis_builder_cash_flow: Migration to 13.0
MiquelRForgeFlow Apr 23, 2020
f1da34f
Added translation using Weblate (Spanish (Argentina))
ibuioli Aug 9, 2020
dab2d30
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 9, 2020
3626c2c
Added translation using Weblate (Dutch)
bosd Dec 16, 2020
f0758fa
Translated using Weblate (Dutch)
bosd Dec 16, 2020
2022aab
Translated using Weblate (Spanish)
anasuarez1 Mar 16, 2021
ccda3c1
[FIX] mis_builder_cash_flow: Proper SQL expression + default for v13
pedrobaeza Jul 7, 2021
5ac0d4a
[IMP] mis_builder_cash_flow: Consider states according selection
pedrobaeza Jul 7, 2021
32ae98c
Translated using Weblate (Spanish (Argentina))
ibuioli Jul 9, 2021
c692223
[IMP] mis_builder_cash_flow: black, isort, prettier
rvalyi Oct 16, 2021
ed9fa18
[MIG] mis_builder_cash_flow: Migration to 14.0
rvalyi Oct 16, 2021
2ac482d
Added translation using Weblate (Italian)
francesco-ooops Dec 20, 2021
d4c3427
Translated using Weblate (Italian)
francesco-ooops Dec 20, 2021
29f0d0e
[MIG] mis_builder_cash_flow: Migration to 15.0
JasminSForgeFlow Feb 22, 2022
4967849
Translated using Weblate (Spanish)
Ivorra78 May 31, 2023
33cc465
[IMP] mis_builder_cash_flow: black, isort, prettier
heliaktiv Jun 7, 2023
448cb69
[MIG] mis_builder_cash_flow: Migration to 16.0
heliaktiv Jun 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions mis_builder_cash_flow/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
=====================
MIS Builder Cash Flow
=====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Faccount--financial--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-reporting/tree/15.0/mis_builder_cash_flow
:alt: OCA/account-financial-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-mis_builder_cash_flow
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/91/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to have a cash flow forecast.
The forecast is based on two types of date:

* Accounting entries: Due date field instead of Date
* Forecast lines: manual lines created that forecast in/out cashflow moves.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to Accounting > Reports > MIS Reporting > MIS Reports and choose "Cash Flow" report
#. You can add forecast lines on Accounting > Reports > MIS Reporting > Cash Flow Forecast Line
#. If you select on "Target Moves" the value "All Posted Entries", you will get only
lines for already posted invoices/entries + the forecast lines.
#. Selecting "All Entries", draft invoices/entries are also included.
#. In any case, cancelled invoices/entries are not included.

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.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20mis_builder_cash_flow%0Aversion:%2015.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
~~~~~~~

* ADHOC SA

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

* Juan José Scarafía <[email protected]>
* Gonzalo Ruzafa <[email protected]>
* Alberto Martín <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza

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-jjscarafia| image:: https://github.com/jjscarafia.png?size=40px
:target: https://github.com/jjscarafia
:alt: jjscarafia

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

|maintainer-jjscarafia|

This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/15.0/mis_builder_cash_flow>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions mis_builder_cash_flow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2019 ADHOC SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
from . import report
24 changes: 24 additions & 0 deletions mis_builder_cash_flow/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 ADHOC SA
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "MIS Builder Cash Flow",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ADHOC SA, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting",
"depends": ["mis_builder"],
"data": [
"security/mis_cash_flow_security.xml",
"report/mis_cash_flow_views.xml",
"views/mis_cash_flow_forecast_line_views.xml",
"views/account_account_views.xml",
"data/mis_report_style.xml",
"data/mis_report.xml",
"data/mis_report_instance.xml",
],
"installable": True,
"maintainers": ["jjscarafia"],
"development_status": "Beta",
}
109 changes: 109 additions & 0 deletions mis_builder_cash_flow/data/mis_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ADHOC SA
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="True">
<record id="mis_report_cash_flow" model="mis.report">
<field name="name">Cash Flow</field>
<field name="style_id" ref="mis_style_cash_flow" />
</record>
<record id="mis_kpi_aliquidity" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">liquidity</field>
<field name="description">LIQUIDITY</field>
<field name="style_id" ref="mis_style_account_sub_total" />
<field name="auto_expand_accounts" eval="True" />
<field name="auto_expand_accounts_style_id" ref="mis_style_account_detail" />
<field name="sequence">20</field>
<field
name="expression"
>bal[][('account_type', '=', 'asset_cash'), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]</field>
</record>
<record id="mis_kpi_in_total" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">in_total</field>
<field name="description">IN TOTAL</field>
<field name="style_id" ref="mis_style_account_sub_total" />
<field name="sequence">30</field>
<field name="expression">in_receivable + in_forecast</field>
</record>
<record id="mis_kpi_in_receivable" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">in_receivable</field>
<field name="description">In receivable</field>
<field name="style_id" ref="mis_style_account_line" />
<field name="auto_expand_accounts" eval="True" />
<field name="auto_expand_accounts_style_id" ref="mis_style_account_detail" />
<field name="sequence">50</field>
<field
name="expression"
>bal[][ ('account_type', '=', 'asset_receivable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]</field>
</record>
<record id="mis_kpi_in_forecast" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">in_forecast</field>
<field name="description">In forecast</field>
<field name="style_id" ref="mis_style_account_line" />
<field name="auto_expand_accounts" eval="True" />
<field name="auto_expand_accounts_style_id" ref="mis_style_account_detail" />
<field name="sequence">70</field>
<field
name="expression"
>bal[][('line_type', '=', 'forecast_line'), ('debit', '!=', 0.0), ('account_id.hide_in_cash_flow', '=', False)]</field>
</record>
<record id="mis_kpi_out_total" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">out_total</field>
<field name="description">OUT TOTAL</field>
<field name="style_id" ref="mis_style_account_sub_total" />
<field name="sequence">80</field>
<field name="expression">out_payable + out_forecast</field>
</record>
<record id="mis_kpi_out_payable" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">out_payable</field>
<field name="description">Out payable</field>
<field name="style_id" ref="mis_style_account_line" />
<field name="auto_expand_accounts" eval="True" />
<field name="auto_expand_accounts_style_id" ref="mis_style_account_detail" />
<field name="sequence">100</field>
<field
name="expression"
>bal[][ ('account_type', '=', 'liability_payable'), ('full_reconcile_id', '=', False), ('line_type', '=', 'move_line'), ('account_id.hide_in_cash_flow', '=', False)]</field>
</record>
<record id="mis_kpi_out_forecast" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">out_forecast</field>
<field name="description">Out forecast</field>
<field name="style_id" ref="mis_style_account_line" />
<field name="auto_expand_accounts" eval="True" />
<field name="auto_expand_accounts_style_id" ref="mis_style_account_detail" />
<field name="sequence">120</field>
<field
name="expression"
>bal[][('line_type', '=', 'forecast_line'), ('credit', '!=', 0.0), ('account_id.hide_in_cash_flow', '=', False)]</field>
</record>
<record id="mis_kpi_period_balance" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">period_balance</field>
<field name="description">PERIOD BALANCE</field>
<field name="style_id" ref="mis_style_account_sub_total" />
<field name="sequence">130</field>
<field name="expression">in_total + out_total</field>
<field
name="style_expression"
>'Cash Flow - Good' if period_balance >= 0.0 else 'Cash Flow - Bad'</field>
</record>
<record id="mis_kpi_balance" model="mis.report.kpi">
<field name="report_id" ref="mis_report_cash_flow" />
<field name="name">balance</field>
<field name="description">BALANCE</field>
<field name="style_id" ref="mis_style_account_total" />
<field name="sequence">150</field>
<field
name="expression"
>bale[][('account_id.hide_in_cash_flow', '=', False), '|', ('line_type', '=', 'forecast_line'), ('line_type', '=', 'move_line'), '|', ('account_type', '=', 'asset_cash'), ('account_type', 'in', ('asset_receivable', 'liability_payable')), ('full_reconcile_id', '=', False)]</field>
<field
name="style_expression"
>'Cash Flow - Good' if balance >= 0.0 else 'Cash Flow - Bad'</field>
</record>
</odoo>
132 changes: 132 additions & 0 deletions mis_builder_cash_flow/data/mis_report_instance.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ADHOC SA
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="True">
<record id="mis_instance_cash_flow" model="mis.report.instance">
<field name="name">Cash Flow</field>
<field name="report_id" ref="mis_report_cash_flow" />
<field name="comparison_mode" eval="True" />
<field name="landscape_pdf" eval="True" />
</record>
<record id="mis_period_current" model="mis.report.instance.period">
<field name="name">Current</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">-4000</field>
<field name="duration">4001</field>
<field name="sequence">4</field>
</record>
<record id="mis_period_plus_1w" model="mis.report.instance.period">
<field name="name">+1w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">1</field>
<field name="duration">1</field>
<field name="sequence">10</field>
</record>
<record id="mis_period_plus_2w" model="mis.report.instance.period">
<field name="name">+2w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">2</field>
<field name="duration">1</field>
<field name="sequence">20</field>
</record>
<record id="mis_period_plus_3w" model="mis.report.instance.period">
<field name="name">+3w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">3</field>
<field name="duration">1</field>
<field name="sequence">30</field>
</record>
<record id="mis_period_plus_4w" model="mis.report.instance.period">
<field name="name">+4w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">4</field>
<field name="duration">1</field>
<field name="sequence">40</field>
</record>
<record id="mis_period_plus_5w" model="mis.report.instance.period">
<field name="name">+5w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">5</field>
<field name="duration">1</field>
<field name="sequence">50</field>
</record>
<record id="mis_period_plus_6w" model="mis.report.instance.period">
<field name="name">+6w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">6</field>
<field name="duration">1</field>
<field name="sequence">60</field>
</record>
<record id="mis_period_plus_7w" model="mis.report.instance.period">
<field name="name">+7w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">7</field>
<field name="duration">1</field>
<field name="sequence">70</field>
</record>
<record id="mis_period_plus_8w" model="mis.report.instance.period">
<field name="name">+8w</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">8</field>
<field name="duration">1</field>
<field name="sequence">80</field>
</record>
<record id="mis_period_plus_third_month" model="mis.report.instance.period">
<field name="name">third month</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">9</field>
<field name="duration">4</field>
<field name="sequence">90</field>
</record>
<record id="mis_period_plus_fourth_month" model="mis.report.instance.period">
<field name="name">fourth month</field>
<field name="report_instance_id" ref="mis_instance_cash_flow" />
<field name="source">actuals_alt</field>
<field name="source_aml_model_id" ref="model_mis_cash_flow" />
<field name="mode">relative</field>
<field name="type">w</field>
<field name="offset">13</field>
<field name="duration">4</field>
<field name="sequence">90</field>
</record>
</odoo>
Loading
Loading