[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
: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/12.0/mis_template_financial_report
.. |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/14.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-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
.. |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
|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**
@ -37,7 +37,7 @@ 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/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
======================
@ -50,7 +50,7 @@ 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_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.
@ -66,6 +66,7 @@ Contributors
~~~~~~~~~~~~
* Holger Brunn <mail@hunki-enterprises.nl> (https://hunki-enterprises.nl)
* Stefan Rijnhart <stefan@opener.amsterdam> (https://opener.amsterdam)
Maintainers
~~~~~~~~~~~
@ -88,6 +89,6 @@ 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/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.

View File

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

View File

@ -4,7 +4,7 @@
<field name="description">Loss</field>
<field
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_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />
@ -19,7 +19,7 @@
<field name="description">Profit</field>
<field
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_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />
@ -74,7 +74,7 @@
<field name="description">Liabilities</field>
<field
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_style_id" ref="style_details_double_indent" />
<field name="style_id" ref="style_header_indent" />
@ -90,7 +90,7 @@
<field name="description">Assets</field>
<field
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_style_id" ref="style_details" />
<field name="style_id" ref="style_header" />

View File

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

View File

@ -1 +1,2 @@
* 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.
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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Dutch MIS Builder templates</title>
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Profit &amp; Loss / Balance sheet MIS templates</title>
<style type="text/css">
/*
@ -360,15 +360,15 @@ ul.auto-toc {
</style>
</head>
<body>
<div class="document" id="dutch-mis-builder-templates">
<h1 class="title">Dutch MIS Builder templates</h1>
<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. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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>This addon provides MIS builder templates to generate Dutch style Profit&amp;Loss and Balance Sheet reports.</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 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">
@ -386,7 +386,7 @@ ul.auto-toc {
<div class="section" id="usage">
<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>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 class="section" id="known-issues-roadmap">
<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>.
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
<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>
</div>
<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>
<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">
@ -425,7 +426,7 @@ 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" 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>
</div>
</div>