[MIG] mis_template_financial_report: Migration to 14.0

pull/1012/head
Stefan Rijnhart 2021-10-19 10:33:18 +02:00 committed by Luis Ernesto García Medina
parent 539ab90026
commit c7b1633adb
7 changed files with 27 additions and 28 deletions

View File

@ -13,19 +13,19 @@ Profit & Loss / Balance sheet MIS templates
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting--lightgray.png?logo=github .. |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/12.0/mis_template_financial_report :target: https://github.com/OCA/account-financial-reporting/tree/14.0/mis_template_financial_report
:alt: OCA/account-financial-reporting :alt: OCA/account-financial-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-mis_template_financial_report :target: https://translation.odoo-community.org/projects/account-financial-reporting-14-0/account-financial-reporting-14-0-mis_template_financial_report
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/176/12.0 :target: https://runbot.odoo-community.org/runbot/91/14.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
This addon provides MIS builder templates to generate Dutch style Profit&Loss and Balance Sheet reports. This addon provides MIS builder templates to generate generic Profit & Loss and Balance Sheet reports.
**Table of contents** **Table of contents**
@ -37,7 +37,7 @@ Usage
Select one of the `Profit & Loss` or `Balance Sheet` templates in a new MIS report. 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/12.0/mis_builder#usage>`_ For details, refer to the `MIS Builder documentation <https://github.com/OCA/mis-builder/tree/14.0/mis_builder#usage>`_
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -50,7 +50,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-reporting/issues>`_. 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. 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 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_template_financial_report%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20mis_template_financial_report%0Aversion:%2014.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. Do not contact contributors directly about support or help with technical issues.
@ -66,6 +66,7 @@ Contributors
~~~~~~~~~~~~ ~~~~~~~~~~~~
* Holger Brunn <mail@hunki-enterprises.nl> (https://hunki-enterprises.nl) * Holger Brunn <mail@hunki-enterprises.nl> (https://hunki-enterprises.nl)
* Stefan Rijnhart <stefan@opener.amsterdam> (https://opener.amsterdam)
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@ -88,6 +89,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-hbrunn| |maintainer-hbrunn|
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/12.0/mis_template_financial_report>`_ project on GitHub. This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/14.0/mis_template_financial_report>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -3,7 +3,7 @@
{ {
"name": "Profit & Loss / Balance sheet MIS templates", "name": "Profit & Loss / Balance sheet MIS templates",
"version": "12.0.1.1.0", "version": "14.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"author": "Hunki Enterprises BV,Odoo Community Association (OCA)", "author": "Hunki Enterprises BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting", "website": "https://github.com/OCA/account-financial-reporting",

View File

@ -4,7 +4,7 @@
<field name="description">Loss</field> <field name="description">Loss</field>
<field <field
name="expression" name="expression"
>balp[('user_type_id', 'in', (ref('account.data_account_type_depreciation').id, ref('account.data_account_type_expenses').id, ref('account.data_account_type_direct_costs').id))][]</field> >balp[('user_type_id', 'in', (ref('account.data_account_type_depreciation').id, ref('account.data_account_type_direct_costs').id, ref('account.data_account_type_expenses').id))][]</field>
<field name="auto_expand_accounts">true</field> <field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" /> <field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" /> <field name="style_id" ref="style_header" />
@ -19,7 +19,7 @@
<field name="description">Profit</field> <field name="description">Profit</field>
<field <field
name="expression" name="expression"
>-balp[('user_type_id', 'in', (ref('account.data_account_type_revenue').id, ref('account.data_account_type_other_income').id, ref('account.data_unaffected_earnings').id))][]</field> >-balp[('user_type_id', 'in', (ref('account.data_account_type_other_income').id, ref('account.data_account_type_revenue').id, ref('account.data_unaffected_earnings').id,))][]</field>
<field name="auto_expand_accounts">true</field> <field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" /> <field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" /> <field name="style_id" ref="style_header" />
@ -74,7 +74,7 @@
<field name="description">Liabilities</field> <field name="description">Liabilities</field>
<field <field
name="expression" name="expression"
>-bale[('user_type_id', 'in', (ref('account.data_account_type_payable').id, ref('account.data_account_type_current_liabilities').id, ref('account.data_account_type_non_current_liabilities').id, ref('account.data_account_type_equity').id))][]</field> >-bale[('user_type_id', 'in', (ref('account.data_account_type_current_liabilities').id, ref('account.data_account_type_equity').id, ref('account.data_account_type_non_current_liabilities').id, ref('account.data_account_type_payable').id))][]</field>
<field name="auto_expand_accounts">true</field> <field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details_double_indent" /> <field name="auto_expand_accounts_style_id" ref="style_details_double_indent" />
<field name="style_id" ref="style_header_indent" /> <field name="style_id" ref="style_header_indent" />
@ -90,7 +90,7 @@
<field name="description">Assets</field> <field name="description">Assets</field>
<field <field
name="expression" name="expression"
>bale[('user_type_id', 'in', (ref('account.data_account_type_receivable').id, ref('account.data_account_type_liquidity').id, ref('account.data_account_type_current_assets').id, ref('account.data_account_type_non_current_assets').id, ref('account.data_account_type_fixed_assets').id))][]</field> >bale[('user_type_id', 'in', (ref('account.data_account_type_credit_card').id, ref('account.data_account_type_prepayments').id, ref('account.data_account_type_current_assets').id, ref('account.data_account_type_fixed_assets').id, ref('account.data_account_type_liquidity').id, ref('account.data_account_type_non_current_assets').id, ref('account.data_account_type_receivable').id))][]</field>
<field name="auto_expand_accounts">true</field> <field name="auto_expand_accounts">true</field>
<field name="auto_expand_accounts_style_id" ref="style_details" /> <field name="auto_expand_accounts_style_id" ref="style_details" />
<field name="style_id" ref="style_header" /> <field name="style_id" ref="style_header" />

View File

@ -3,13 +3,12 @@
import copy import copy
from collections import OrderedDict from collections import OrderedDict
from odoo import api, models from odoo import models
class MisReportInstance(models.Model): class MisReportInstance(models.Model):
_inherit = "mis.report.instance" _inherit = "mis.report.instance"
@api.multi
def compute(self): def compute(self):
if not self._is_horizontal(): if not self._is_horizontal():
return super().compute() return super().compute()
@ -25,7 +24,6 @@ class MisReportInstance(models.Model):
return result return result
@api.multi
def _is_horizontal(self): def _is_horizontal(self):
"""Determine if the report template is a horizontal one""" """Determine if the report template is a horizontal one"""
self.ensure_one() self.ensure_one()
@ -34,7 +32,6 @@ class MisReportInstance(models.Model):
"mis_template_financial_report.report_pl", "mis_template_financial_report.report_pl",
} }
@api.multi
def _compute_horizontal_matrices(self, matrix=None): def _compute_horizontal_matrices(self, matrix=None):
"""Compute the matrix (if not passed) and return the split versions""" """Compute the matrix (if not passed) and return the split versions"""
return self._split_matrix( return self._split_matrix(
@ -48,7 +45,6 @@ class MisReportInstance(models.Model):
], ],
) )
@api.multi
def _split_matrix(self, original_matrix, kpi_defs=None, keep_remaining=True): def _split_matrix(self, original_matrix, kpi_defs=None, keep_remaining=True):
"""Split a matrix by duplicating it as shallowly as possible and removing """Split a matrix by duplicating it as shallowly as possible and removing
rows according to kpi_defs rows according to kpi_defs

View File

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

View File

@ -1,3 +1,3 @@
Select one of the `Profit & Loss` or `Balance Sheet` templates in a new MIS report. 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/12.0/mis_builder#usage>`_ For details, refer to the `MIS Builder documentation <https://github.com/OCA/mis-builder/tree/14.0/mis_builder#usage>`_

View File

@ -3,8 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Dutch MIS Builder templates</title> <title>Profit &amp; Loss / Balance sheet MIS templates</title>
<style type="text/css"> <style type="text/css">
/* /*
@ -360,15 +360,15 @@ ul.auto-toc {
</style> </style>
</head> </head>
<body> <body>
<div class="document" id="dutch-mis-builder-templates"> <div class="document" id="profit-loss-balance-sheet-mis-templates">
<h1 class="title">Dutch MIS Builder templates</h1> <h1 class="title">Profit &amp; Loss / Balance sheet MIS templates</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/account-financial-reporting/tree/12.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" href="https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-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" href="https://runbot.odoo-community.org/runbot/176/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" 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" 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" href="https://github.com/OCA/account-financial-reporting/tree/14.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" href="https://translation.odoo-community.org/projects/account-financial-reporting-14-0/account-financial-reporting-14-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" href="https://runbot.odoo-community.org/runbot/91/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This addon provides MIS builder templates to generate Dutch style Profit&amp;Loss and Balance Sheet reports.</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> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
@ -386,7 +386,7 @@ ul.auto-toc {
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1> <h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>Select one of the <cite>Profit &amp; Loss</cite> or <cite>Balance Sheet</cite> templates in a new MIS report.</p> <p>Select one of the <cite>Profit &amp; Loss</cite> or <cite>Balance Sheet</cite> 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/12.0/mis_builder#usage">MIS Builder documentation</a></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>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
@ -399,7 +399,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>. <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. 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 If you spotted it first, help us smashing 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:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20mis_template_financial_report%0Aversion:%2014.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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -414,6 +414,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<h2><a class="toc-backref" href="#id6">Contributors</a></h2> <h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<ul class="simple"> <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>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> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@ -425,7 +426,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/hbrunn"><img alt="hbrunn" src="https://github.com/hbrunn.png?size=40px" /></a></p> <p><a class="reference external" 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/12.0/mis_template_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/14.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> <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> </div>