Merge PR #1340 into 18.0

Signed-off-by hbrunn
This commit is contained in:
OCA-git-bot
2025-08-22 06:43:04 +00:00
33 changed files with 1569 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
===========================================
Profit & Loss / Balance sheet MIS templates
===========================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:43a58797d5d60f19a2ce7f6e20a38f052a0d5d7c3ebe2ef50fa88e9899b2069e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/18.0/mis_template_financial_report
: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-18-0/account-financial-reporting-18-0-mis_template_financial_report
: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/account-financial-reporting&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This addon provides MIS builder templates to generate generic Profit &
Loss and Balance Sheet reports.
**Table of contents**
.. contents::
:local:
Configuration
=============
To render the reports from this module horizontally in two columns on
the same page, check the Horizontal checkbox on the Layout tab of the
report. This checkbox is only available for reports that support the
horizontal mode.
Usage
=====
Select one of the Profit & Loss or Balance Sheet templates in a new MIS
report.
For details, refer to the `MIS Builder
documentation <https://github.com/OCA/mis-builder/tree/14.0/mis_builder#usage>`__
Known issues / Roadmap
======================
- support horizontal mode for xslx export
- split off all code to mis_builder_horizontal and only keep the KPI
definitions here
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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20mis_template_financial_report%0Aversion:%2018.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
-------
* Hunki Enterprises BV
Contributors
------------
- Holger Brunn <mail@hunki-enterprises.nl>
(https://hunki-enterprises.nl)
- Stefan Rijnhart <stefan@opener.amsterdam> (https://opener.amsterdam)
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-hbrunn| image:: https://github.com/hbrunn.png?size=40px
:target: https://github.com/hbrunn
:alt: hbrunn
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-hbrunn|
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/18.0/mis_template_financial_report>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1 @@
from . import models

View File

@@ -0,0 +1,31 @@
# Copyright 2020 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Profit & Loss / Balance sheet MIS templates",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Hunki Enterprises BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting",
"category": "Localization",
"depends": ["mis_builder"],
"data": [
"data/mis_report_style.xml",
"data/mis_report.xml",
"data/mis_report_kpi.xml",
"data/mis_report_subreport.xml",
"views/mis_report_instance_views.xml",
"views/mis_report_kpi_views.xml",
"views/templates.xml",
],
"assets": {
"web.assets_backend": [
"mis_template_financial_report/static/src/components/mis_report_widget.xml",
"mis_template_financial_report/static/src/components/mis_report_widget.css",
],
"web.report_assets_common": [
"mis_template_financial_report/static/src/css/report.css"
],
},
"maintainers": ["hbrunn"],
}

View File

@@ -0,0 +1,10 @@
<odoo>
<record id="report_pl" model="mis.report">
<field name="name">Profit &amp; Loss</field>
<field name="style_id" ref="style_default" />
</record>
<record id="report_bs" model="mis.report">
<field name="name">Balance Sheet</field>
<field name="style_id" ref="style_default" />
</record>
</odoo>

View File

@@ -0,0 +1,101 @@
<odoo>
<record id="kpi_loss" model="mis.report.kpi">
<field name="name">loss</field>
<field name="description">Loss</field>
<field name="expression">balp[('account_type', 'like', 'expense%')][]</field>
<field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />
<field name="type">num</field>
<field name="compare_method">diff</field>
<field name="accumulation_method">sum</field>
<field name="sequence">100</field>
<field name="report_id" ref="report_pl" />
</record>
<record id="kpi_profit" model="mis.report.kpi">
<field name="name">profit</field>
<field name="description">Profit</field>
<field
name="expression"
>-balp['|', ('account_type', 'like', 'income%'), ('account_type', 'like', 'equity_unaffected')][]</field>
<field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />
<field name="type">num</field>
<field name="compare_method">diff</field>
<field name="accumulation_method">sum</field>
<field name="sequence">0</field>
<field name="report_id" ref="report_pl" />
<field name="split_after" eval="True" />
</record>
<record id="kpi_pl_to_report" model="mis.report.kpi">
<field name="id">3</field>
<field name="name">pl_to_report</field>
<field name="description">Profit or loss to report</field>
<field name="expression">profit - loss</field>
<field name="auto_expand_accounts">false</field>
<field name="style_id" ref="style_header" />
<field name="type">num</field>
<field name="compare_method">diff</field>
<field name="accumulation_method">none</field>
<field name="sequence">101</field>
<field name="report_id" ref="report_pl" />
</record>
<record id="kpi_liability_total" model="mis.report.kpi">
<field name="id">8</field>
<field name="name">liability_header</field>
<field name="description">Liability</field>
<field name="expression">liability + subreport_pl.pl_to_report</field>
<field name="auto_expand_accounts">false</field>
<field name="style_id" ref="style_header" />
<field name="type">num</field>
<field name="compare_method">none</field>
<field name="accumulation_method">none</field>
<field name="sequence">100</field>
<field name="report_id" ref="report_bs" />
</record>
<record id="kpi_liability_pl_subreport" model="mis.report.kpi">
<field name="id">7</field>
<field name="name">pl</field>
<field name="description">Profit / Loss</field>
<field name="expression">subreport_pl.pl_to_report</field>
<field name="auto_expand_accounts">false</field>
<field name="style_id" ref="style_header_indent" />
<field name="type">num</field>
<field name="compare_method">pct</field>
<field name="accumulation_method">sum</field>
<field name="sequence">102</field>
<field name="report_id" ref="report_bs" />
</record>
<record id="kpi_liability" model="mis.report.kpi">
<field name="id">5</field>
<field name="name">liability</field>
<field name="description">Liabilities</field>
<field
name="expression"
>-bale['|', ('account_type', 'like', 'liability%'), ('account_type', '=', 'equity')][]</field>
<field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details_double_indent" />
<field name="style_id" ref="style_header_indent" />
<field name="type">num</field>
<field name="compare_method">diff</field>
<field name="accumulation_method">sum</field>
<field name="sequence">101</field>
<field name="report_id" ref="report_bs" />
</record>
<record id="kpi_assets" model="mis.report.kpi">
<field name="id">4</field>
<field name="name">assets</field>
<field name="description">Assets</field>
<field name="expression">bale[('account_type', 'like', 'asset%')][]</field>
<field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />
<field name="type">num</field>
<field name="compare_method">diff</field>
<field name="accumulation_method">sum</field>
<field name="sequence">0</field>
<field name="report_id" ref="report_bs" />
<field name="split_after" eval="True" />
</record>
</odoo>

View File

@@ -0,0 +1,31 @@
<odoo>
<record id="style_default" model="mis.report.style">
<field name="name">PL/BS default</field>
<field name="dp_inherit">false</field>
<field name="dp">2</field>
<field name="hide_empty_inherit">false</field>
<field name="hide_empty">true</field>
</record>
<record id="style_header" model="mis.report.style">
<field name="name">PL/BS header</field>
<field name="font_weight_inherit">false</field>
<field name="font_weight">bold</field>
</record>
<record id="style_details_double_indent" model="mis.report.style">
<field name="name">PL/BS double indented details</field>
<field name="indent_level_inherit">false</field>
<field name="indent_level">2</field>
</record>
<record id="style_header_indent" model="mis.report.style">
<field name="name">PL/BS indented header</field>
<field name="font_weight_inherit">false</field>
<field name="font_weight">bold</field>
<field name="indent_level_inherit">false</field>
<field name="indent_level">1</field>
</record>
<record id="style_details" model="mis.report.style">
<field name="name">PL/BS details</field>
<field name="indent_level_inherit">false</field>
<field name="indent_level">1</field>
</record>
</odoo>

View File

@@ -0,0 +1,7 @@
<odoo>
<record id="subreport_pl" model="mis.report.subreport">
<field name="report_id" ref="report_bs" />
<field name="subreport_id" ref="report_pl" />
<field name="name">subreport_pl</field>
</record>
</odoo>

View File

@@ -0,0 +1,108 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-05-04 12:05+0000\n"
"Last-Translator: Víctor Martínez <victor.martinez@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr "Permitir horizontal"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr "Activos"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr "Balance de situación"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr "Horizontal"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr "Pasivos"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr "Pasivo"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr "Pérdidas"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr "Instancia de informe MIS"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr "Beneficio"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr "Ganancias y Pérdidas"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr "Ganancias / Pérdidas"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr "Ganancias o pérdidas a reportar"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr ""
#~ msgid "Display Name"
#~ msgstr "Nombre mostrado"
#~ msgid "ID"
#~ msgstr "ID"
#~ msgid "Last Modified on"
#~ msgstr "Última modificación en"

View File

@@ -0,0 +1,97 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr ""

View File

@@ -0,0 +1,108 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-02-11 15:16+0000\n"
"Last-Translator: Abdourahmane Wone <abdourahmanewone@gmail.com>\n"
"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr "Autoriser l'horizontale"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr "Actifs"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr "Bilan"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr "Horizontal"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr "Passifs"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr "Passif"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr "Perte"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr "Instance de rapport SIG"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr "Profit"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr "Perte & profit"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr "Profit / Perte"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr "Bénéfice ou perte à déclarer"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr ""
#~ msgid "Display Name"
#~ msgstr "Afficher un nom"
#~ msgid "ID"
#~ msgstr "ID"
#~ msgid "Last Modified on"
#~ msgstr "Dernière modification le"

View File

@@ -0,0 +1,101 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-06-15 22:41+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr "Consenti orizzontale"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr "Cespiti"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr "Stato patrimoniale"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr "Orizzontale"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr "Passività"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr "Passivo"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr "Minusvalenza"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr "Istanza MIS Report"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr "KPI MIS Report"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr "Ricavo"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr "Conto economico"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr "Ricavo / perdita"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr "Ricavo o perdita da rendicontare"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr "Dividi dopo"
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
"Dividere la tabella dopo questo KPI. Questo consente la visualizzazione dei "
"KPI uno vicino all'altro in modo non comparativo"
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr "Divisione"

View File

@@ -0,0 +1,96 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr ""
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr ""
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr ""

View File

@@ -0,0 +1,101 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mis_template_financial_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-01 22:41+0000\n"
"Last-Translator: Peter Romão <peterromao@yahoo.co.uk>\n"
"Language-Team: none\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.6.2\n"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__allow_horizontal
msgid "Allow Horizontal"
msgstr "Permitir Horizontal"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_assets
msgid "Assets"
msgstr "Ativos"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_bs
msgid "Balance Sheet"
msgstr "Balanço"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_instance__horizontal
msgid "Horizontal"
msgstr "Horizontal"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability
msgid "Liabilities"
msgstr "Passivos"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_total
msgid "Liability"
msgstr "Passivo"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_loss
msgid "Loss"
msgstr "Perdas"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_instance
msgid "MIS Report Instance"
msgstr "Instância de Relatório MIS"
#. module: mis_template_financial_report
#: model:ir.model,name:mis_template_financial_report.model_mis_report_kpi
msgid "MIS Report KPI"
msgstr "KPI do relatório MIS"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_profit
msgid "Profit"
msgstr "Lucros"
#. module: mis_template_financial_report
#: model:mis.report,name:mis_template_financial_report.report_pl
msgid "Profit & Loss"
msgstr "Demonstração de Resultados"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_liability_pl_subreport
msgid "Profit / Loss"
msgstr "Lucros / Perdas"
#. module: mis_template_financial_report
#: model:mis.report.kpi,description:mis_template_financial_report.kpi_pl_to_report
msgid "Profit or loss to report"
msgstr "Lucro ou prejuízo a relatar"
#. module: mis_template_financial_report
#: model:ir.model.fields,field_description:mis_template_financial_report.field_mis_report_kpi__split_after
msgid "Split After"
msgstr "Dividir Depois"
#. module: mis_template_financial_report
#: model:ir.model.fields,help:mis_template_financial_report.field_mis_report_kpi__split_after
msgid ""
"Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode"
msgstr ""
"Dividir a tabela depois deste KPI. Isto permite exibir KPIs lado a lado no "
"modo não comparativo"
#. module: mis_template_financial_report
#: model_terms:ir.ui.view,arch_db:mis_template_financial_report.mis_report_view_kpi_form
msgid "Splitting"
msgstr "Dividindo"

View File

@@ -0,0 +1,2 @@
from . import mis_report_instance
from . import mis_report_kpi

View File

@@ -0,0 +1,53 @@
# Copyright 2020 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import copy
from collections import OrderedDict
from odoo import api, fields, models
class MisReportInstance(models.Model):
_inherit = "mis.report.instance"
allow_horizontal = fields.Boolean(compute="_compute_allow_horizontal")
horizontal = fields.Boolean()
@api.depends("report_id")
def _compute_allow_horizontal(self):
"""Indicate that the instance supports horizontal rendering."""
for instance in self:
instance.allow_horizontal = any(
instance.mapped("report_id.kpi_ids.split_after")
)
def compute(self):
if not self.horizontal:
return super().compute()
full_matrix = self._compute_matrix()
matrices = self._split_matrix(full_matrix)
result = full_matrix.as_dict()
result["split_matrices"] = [extra_matrix.as_dict() for extra_matrix in matrices]
return result
def _split_matrix(self, original_matrix):
"""Split a matrix according to the split_after flag in the kpis used"""
result = []
def clone_matrix():
clone = copy.copy(original_matrix)
clone._kpi_rows = OrderedDict()
result.append(clone)
return clone
current = clone_matrix()
for kpi in original_matrix._kpi_rows:
current._kpi_rows[kpi] = original_matrix._kpi_rows[kpi]
if kpi.split_after:
current = clone_matrix()
return result

View File

@@ -0,0 +1,12 @@
# Copyright 2023 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MisReportKpi(models.Model):
_inherit = "mis.report.kpi"
split_after = fields.Boolean(
help="Split the table after this KPI. This allows displaying KPIs next to each "
"other in non-comparison mode",
)

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,4 @@
To render the reports from this module horizontally in two columns on
the same page, check the Horizontal checkbox on the Layout tab of the
report. This checkbox is only available for reports that support the
horizontal mode.

View File

@@ -0,0 +1,4 @@
- Holger Brunn \<<mail@hunki-enterprises.nl>\>
(<https://hunki-enterprises.nl>)
- Stefan Rijnhart \<<stefan@opener.amsterdam>\>
(<https://opener.amsterdam>)

View File

@@ -0,0 +1,2 @@
This addon provides MIS builder templates to generate generic Profit &
Loss and Balance Sheet reports.

View File

@@ -0,0 +1,3 @@
- support horizontal mode for xslx export
- split off all code to mis_builder_horizontal and only keep the KPI
definitions here

View File

@@ -0,0 +1,5 @@
Select one of the Profit & Loss or Balance Sheet templates in a new MIS
report.
For details, refer to the [MIS Builder
documentation](https://github.com/OCA/mis-builder/tree/14.0/mis_builder#usage)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,453 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Profit &amp; Loss / Balance sheet MIS templates</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
: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.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
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 }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="profit-loss-balance-sheet-mis-templates">
<h1 class="title">Profit &amp; Loss / Balance sheet MIS templates</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:43a58797d5d60f19a2ce7f6e20a38f052a0d5d7c3ebe2ef50fa88e9899b2069e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/18.0/mis_template_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-mis_template_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon provides MIS builder templates to generate generic Profit &amp;
Loss and Balance Sheet reports.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-3">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>To render the reports from this module horizontally in two columns on
the same page, check the Horizontal checkbox on the Layout tab of the
report. This checkbox is only available for reports that support the
horizontal mode.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>Select one of the Profit &amp; Loss or Balance Sheet templates in a new MIS
report.</p>
<p>For details, refer to the <a class="reference external" href="https://github.com/OCA/mis-builder/tree/14.0/mis_builder#usage">MIS Builder
documentation</a></p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>support horizontal mode for xslx export</li>
<li>split off all code to mis_builder_horizontal and only keep the KPI
definitions here</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20mis_template_financial_report%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>Hunki Enterprises BV</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Holger Brunn &lt;<a class="reference external" href="mailto:mail&#64;hunki-enterprises.nl">mail&#64;hunki-enterprises.nl</a>&gt;
(<a class="reference external" href="https://hunki-enterprises.nl">https://hunki-enterprises.nl</a>)</li>
<li>Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a>&gt; (<a class="reference external" href="https://opener.amsterdam">https://opener.amsterdam</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/hbrunn"><img alt="hbrunn" src="https://github.com/hbrunn.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/18.0/mis_template_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,11 @@
.oe_mis_builder_content.horizontal {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.oe_mis_builder_content.horizontal .oe_mis_builder_cp {
width: 100%;
}
.oe_mis_builder_content.horizontal .o_list_renderer {
flex-grow: 1;
}

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<templates>
<t t-inherit="mis_builder.MisReportWidget" t-inherit-mode="extension">
<xpath expr="//div[hasclass('oe_mis_builder_content')]" position="attributes">
<attribute
name="t-attf-class"
>{{state.mis_report_data.split_matrices and 'horizontal'}}</attribute>
</xpath>
<xpath expr="//table[hasclass('mis_builder')]/.." position="attributes">
<attribute
name="t-foreach"
>state.mis_report_data.split_matrices or [state.mis_report_data]</attribute>
<attribute name="t-as">matrix</attribute>
<attribute name="t-key">matrix_index</attribute>
</xpath>
<xpath
expr="//tr[@t-foreach='state.mis_report_data.header']"
position="attributes"
>
<attribute name="t-foreach">matrix.header</attribute>
</xpath>
<xpath
expr="//tr[@t-foreach='state.mis_report_data.body']"
position="attributes"
>
<attribute name="t-foreach">matrix.body</attribute>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,11 @@
div.mis_builder_horizontal_container {
display: table;
width: 100%;
border-spacing: 5px;
}
div.mis_builder_horizontal_row {
display: table-row;
}
div.mis_builder_horizontal_cell {
display: table-cell;
}

View File

@@ -0,0 +1 @@
from . import test_mis_template_financial_report

View File

@@ -0,0 +1,18 @@
# Copyright 2020 Hunki Enterprises BV
# Copyright 2021 Opener B.V. <stefan@opener.am>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestMisTemplateFinancialReport(TransactionCase):
def test_mis_template_financial_report(self):
instance = self.env["mis.report.instance"].create(
{
"name": "Balance Sheet",
"report_id": self.env.ref("mis_template_financial_report.report_bs").id,
}
)
self.assertTrue(instance.allow_horizontal)
instance.horizontal = True
result_dict = instance.compute()
self.assertEqual(len(result_dict.get("split_matrices", [])), 2)

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record model="ir.ui.view" id="mis_report_instance_view_form">
<field name="name">Add horizontal option to MIS report instance form</field>
<field name="model">mis.report.instance</field>
<field name="inherit_id" ref="mis_builder.mis_report_instance_view_form" />
<field name="arch" type="xml">
<group name="layout" position="inside">
<field name="allow_horizontal" invisible="1" />
<field name="horizontal" invisible="not allow_horizontal" />
</group>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record model="ir.ui.view" id="mis_report_view_kpi_form">
<field name="model">mis.report.kpi</field>
<field name="inherit_id" ref="mis_builder.mis_report_view_kpi_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='auto_expand_accounts']/.." position="after">
<group name="split" string="Splitting">
<field name="split_after" />
</group>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,26 @@
<odoo>
<template
id="report_mis_report_instance"
inherit_id="mis_builder.report_mis_report_instance"
>
<xpath expr="//div[hasclass('mis_table')]" position="before">
<div class="mis_builder_horizontal_container">
<div class="mis_builder_horizontal_row">
<div
class="mis_builder_horizontal_cell"
t-foreach="o.horizontal and o._split_matrix(matrix) or [matrix]"
t-as="matrix"
/>
</div>
</div>
</xpath>
<xpath expr="//div[hasclass('mis_builder_horizontal_cell')]" position="inside">
<xpath expr="//div[hasclass('mis_table')]" position="move" />
</xpath>
<xpath expr="//div[hasclass('mis_table')]" position="attributes">
<attribute
name="t-attf-class"
>mis_table {{o.horizontal and 'horizontal'}}</attribute>
</xpath>
</template>
</odoo>