[MIG] mis_template_financial_report: Migration to 14.0

This commit is contained in:
Stefan Rijnhart
2021-10-19 10:33:18 +02:00
committed by Geraldo Lopez
parent de2c0857c1
commit 458475146d
7 changed files with 27 additions and 28 deletions

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