diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-05-25 07:04:52 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-08-17 09:09:02 +0000 |
| commit | 6156f98288b16f6c84d36bacf16d5a66a661abb3 (patch) | |
| tree | 7a760d990d660640fed108a5d1fb5c8ce62a52e5 /addons/base_setup | |
| parent | d5c16492397047ceb97a0879aa61f068a0eeeca8 (diff) | |
[FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
Diffstat (limited to 'addons/base_setup')
| -rw-r--r-- | addons/base_setup/models/res_config_settings.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/base_setup/models/res_config_settings.py b/addons/base_setup/models/res_config_settings.py index 04b695c141f..acbe5a873c5 100644 --- a/addons/base_setup/models/res_config_settings.py +++ b/addons/base_setup/models/res_config_settings.py @@ -60,7 +60,7 @@ class ResConfigSettings(models.TransientModel): } def open_default_user(self): - action = self.env.ref('base.action_res_users').read()[0] + action = self.env["ir.actions.actions"]._for_xml_id("base.action_res_users") action['res_id'] = self.env.ref('base.default_user').id action['views'] = [[self.env.ref('base.view_users_form').id, 'form']] return action |
