diff --git a/odex25_accounting/exp_budget_check/models/account_invoice.py b/odex25_accounting/exp_budget_check/models/account_invoice.py index 3aafc73e1..ca3608c18 100644 --- a/odex25_accounting/exp_budget_check/models/account_invoice.py +++ b/odex25_accounting/exp_budget_check/models/account_invoice.py @@ -195,7 +195,7 @@ class AccountMove(models.Model): _("The Expense account %s is assigned to more than one budget position %s")%(line.account_id.name,[x.name for x in budget_post])) budget_lines = self.env['crossovered.budget.lines'].search( [('analytic_account_id', '=', line.analytic_account_id.id), - ('general_budget_id', 'in', budget_post), + ('general_budget_id', 'in', budget_post.ids), ('crossovered_budget_id.state', '=', 'done'), ('crossovered_budget_id.date_from', '<=', self.invoice_date), ('crossovered_budget_id.date_to', '>=', self.invoice_date)]) diff --git a/odex25_accounting/exp_budget_check/models/hr_expense.py b/odex25_accounting/exp_budget_check/models/hr_expense.py index d376944bc..ee24ab1b7 100644 --- a/odex25_accounting/exp_budget_check/models/hr_expense.py +++ b/odex25_accounting/exp_budget_check/models/hr_expense.py @@ -148,7 +148,7 @@ class AccountMove(models.Model): self.account_id.name, [x.name for x in budget_post])) budget_lines = self.env['crossovered.budget.lines'].search( [('analytic_account_id', '=', self.analytic_account_id.id), - ('general_budget_id', 'in', budget_post), + ('general_budget_id', 'in', budget_post.ids), ('crossovered_budget_id.state', '=', 'done'), ('crossovered_budget_id.date_from', '<=', self.date), ('crossovered_budget_id.date_to', '>=', self.date)])