From 124377f7c5be35aface7e172361a15906774b0ca Mon Sep 17 00:00:00 2001 From: git_admin Date: Tue, 28 Apr 2026 07:35:31 +0000 Subject: [PATCH] Tower: upload at_accounting 18.0.1.7 (via marketplace) --- .../models/executive_summary_report.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 addons/at_accounting/models/executive_summary_report.py diff --git a/addons/at_accounting/models/executive_summary_report.py b/addons/at_accounting/models/executive_summary_report.py new file mode 100644 index 0000000..f048a4f --- /dev/null +++ b/addons/at_accounting/models/executive_summary_report.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models +from odoo.exceptions import UserError + +class ExecutiveSummaryReport(models.Model): + _inherit = 'account.report' + + def _report_custom_engine_executive_summary_ndays(self, expressions, options, date_scope, current_groupby, next_groupby, offset=0, limit=None, warnings=None): + if current_groupby or next_groupby: + raise UserError("NDays expressions of executive summary report don't support the 'group by' feature.") + + date_diff = fields.Date.from_string(options['date']['date_to']) - fields.Date.from_string(options['date']['date_from']) + return {'result': date_diff.days}