[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 <ndeodoo@users.noreply.github.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Nathan de Pryck
2020-10-29 09:15:47 +00:00
parent 1a278f7b80
commit 8a12247211
+1 -1
View File
@@ -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