From 8f1b0aece57c186d24a98e0b82e203a00ae5a701 Mon Sep 17 00:00:00 2001 From: pol Date: Fri, 20 Sep 2024 13:23:41 +0200 Subject: [PATCH] [16.0][FIX] account_budget_oca: fix operation error _compute_practical_amount --- account_budget_oca/models/account_budget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_budget_oca/models/account_budget.py b/account_budget_oca/models/account_budget.py index 9068bf71..c5190fb9 100644 --- a/account_budget_oca/models/account_budget.py +++ b/account_budget_oca/models/account_budget.py @@ -151,7 +151,7 @@ def _compute_practical_amount(self): acc_ids = line.general_budget_id.account_ids.ids date_to = line.date_to date_from = line.date_from - if line.analytic_account_id.id: + if line.analytic_account_id.id and date_from and date_to: self.env.cr.execute( """ SELECT SUM(amount)