diff --git a/odex25_accounting/exp_budget_check/models/account_invoice.py b/odex25_accounting/exp_budget_check/models/account_invoice.py index ca3608c18..f1a98124b 100644 --- a/odex25_accounting/exp_budget_check/models/account_invoice.py +++ b/odex25_accounting/exp_budget_check/models/account_invoice.py @@ -65,7 +65,7 @@ class AccountMove(models.Model): def _compute_rec_payment_count(self): for invoice in self: - payments = self.env['account.payment'].search_count([ + payments = self.env['account.payment'].sudo().search_count([ ('invoice_rec_id', '=', invoice.id) ]) invoice.rec_payment_count = payments