Skip to content
Snippets Groups Projects
Commit 3f31410a authored by Ivan Yelizariev's avatar Ivan Yelizariev
Browse files

[FIX] account: add missed sudo for get_param


The problem comes from #65789

closes odoo/odoo#66547

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent d2f3c9e7
No related branches found
No related tags found
No related merge requests found
......@@ -341,7 +341,7 @@ class AccountBankStatement(models.Model):
def action_bank_reconcile_bank_statements(self):
self.ensure_one()
limit = int(self.env["ir.config_parameter"].get_param("account.reconcile.batch", 1000))
limit = int(self.env["ir.config_parameter"].sudo().get_param("account.reconcile.batch", 1000))
bank_stmt_lines = self.env['account.bank.statement.line'].search([
('statement_id', 'in', self.ids),
# take not reconciled lines only. See _check_lines_reconciled method
......
......@@ -423,7 +423,7 @@ class account_journal(models.Model):
def action_open_reconcile(self):
if self.type in ['bank', 'cash']:
# Open reconciliation view for bank statements belonging to this journal
limit = int(self.env["ir.config_parameter"].get_param("account.reconcile.batch", 1000))
limit = int(self.env["ir.config_parameter"].sudo().get_param("account.reconcile.batch", 1000))
bank_stmt = self.env['account.bank.statement.line'].search([
('journal_id', 'in', self.ids),
# take not reconciled lines only. See _check_lines_reconciled method
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment