[FIX] account: use column group options to audit carryover lines

In enterprise, when doing a comparison between multiple periods with values carried over to them, auditing the carryover values (through the dedicated button in the popup, in debug mode) always opened the latest period.

This was due to the fact the main options of the report were directly used, instead of the ones corresponding to the column group owning the value.

closes odoo/odoo#136868

X-original-commit: e80680e47218f2109c0ba599d4a1f41651f65c62
Related: odoo/enterprise#48030
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
This commit is contained in:
oco-odoo
2023-09-28 10:22:07 +00:00
parent 2e5175919c
commit 521176c2b8
+4 -1
View File
@@ -735,7 +735,10 @@ class AccountReportExpression(models.Model):
return auto_chosen_target
def action_view_carryover_lines(self, options):
def action_view_carryover_lines(self, options, column_group_key=None):
if column_group_key:
options = self.report_line_id.report_id._get_column_group_options(options, column_group_key)
date_from, date_to, dummy = self.report_line_id.report_id._get_date_bounds_info(options, self.date_scope)
return {