From 8a12247211d89d598ff2b75c8cedc2b88dc43a1b Mon Sep 17 00:00:00 2001 From: Nathan de Pryck Date: Tue, 27 Oct 2020 16:12:23 +0000 Subject: [PATCH] [FIX] account: use _for_xml_id to read action Use of '_for_xml_id' instead of read in order to avoid access right issue on 'ir.actions.act_window'. closes odoo/odoo#60946 X-original-commit: 4e65fbf14491ea97415ede6d10385222c8d4d074 Signed-off-by: ndeodoo Signed-off-by: Martin Trigaux (mat) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 34025b9af78..8ef9a09d00f 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -4679,7 +4679,7 @@ class AccountMoveLine(models.Model): return ids def open_reconcile_view(self): - [action] = self.env.ref('account.action_account_moves_all_a').read() + action = self.env['ir.actions.act_window']._for_xml_id('account.action_account_moves_all_a') ids = self._reconciled_lines() action['domain'] = [('id', 'in', ids)] return action