From 1712a00d10d7cd50359a4e9fd2c3a75d15001a8e Mon Sep 17 00:00:00 2001 From: hupo-odoo Date: Thu, 16 Mar 2023 09:32:31 +0000 Subject: [PATCH] [IMP] account: dashboard tax return task due By default the reminder for tax report is set to 7 days after period (date is correct). On the Accounting Dashboard, we should therefore not see the reminder on the dashboard of the Miscellaneous journal if the deadline of the tax report is not due. For example, we are the 16th of March, we do not want to see the reminder for the Tax Report for March. We only want to see it from the 7th of April. closes odoo/odoo#116051 Task: 3231957 X-original-commit: 66672cf7f63548638ad218d5cae44cde5868b318 Signed-off-by: Quentin De Paoli Signed-off-by: hupo-odoo --- addons/account/models/account_journal_dashboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 62bff99f343..0b07a7f7f7b 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -49,6 +49,7 @@ class account_journal(models.Model): LEFT JOIN mail_activity_type act_type ON act.activity_type_id = act_type.id WHERE act.res_model = 'account.move' AND m.journal_id = %s + AND (act_type.category != 'tax_report' OR (act_type.category = 'tax_report' AND act.date_deadline <= CURRENT_DATE)) ''' self.env.cr.execute(sql_query, (journal.id,)) for activity in self.env.cr.dictfetchall():