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)