diff --git a/addons/iap/models/__init__.py b/addons/iap/models/__init__.py index 2e95fd52ee5..a8953fb44f3 100644 --- a/addons/iap/models/__init__.py +++ b/addons/iap/models/__init__.py @@ -2,5 +2,4 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import iap_account -from . import res_config_settings from . import iap_enrich_api diff --git a/addons/iap/models/iap_account.py b/addons/iap/models/iap_account.py index 8aae79f9e0b..e5c6e5e1fcd 100644 --- a/addons/iap/models/iap_account.py +++ b/addons/iap/models/iap_account.py @@ -203,14 +203,6 @@ class IapAccount(models.Model): def action_toggle_show_token(self): for account in self: account.show_token = not account.show_token - @api.model - def get_account_url(self): - """ Called only by res settings """ - route = '/iap/services' - endpoint = iap_tools.iap_get_endpoint(self.env) - d = {'dbuuid': self.env['ir.config_parameter'].sudo().get_param('database.uuid')} - - return '%s?%s' % (endpoint + route, werkzeug.urls.url_encode(d)) @api.model def get_config_account_url(self): diff --git a/addons/iap/models/res_config_settings.py b/addons/iap/models/res_config_settings.py deleted file mode 100644 index 9c999eed653..00000000000 --- a/addons/iap/models/res_config_settings.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import api, models - - -class ResConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' - - @api.model - def _redirect_to_iap_account(self): - return { - 'type': 'ir.actions.act_url', - 'url': self.env['iap.account'].get_account_url(), - } diff --git a/addons/iap/static/src/action_buttons_widget/action_buttons_widget.js b/addons/iap/static/src/action_buttons_widget/action_buttons_widget.js index d7a06c4d65b..8c5525e56ea 100644 --- a/addons/iap/static/src/action_buttons_widget/action_buttons_widget.js +++ b/addons/iap/static/src/action_buttons_widget/action_buttons_widget.js @@ -12,11 +12,7 @@ class IAPActionButtonsWidget extends Component { } async onViewServicesClicked() { - const url = await this.orm.silent.call("iap.account", "get_account_url"); - this.action.doAction({ - type: "ir.actions.act_url", - url: url, - }); + this.action.doAction("iap.iap_account_action"); } async onBuyLinkClicked() { diff --git a/addons/iap/views/res_config_settings.xml b/addons/iap/views/res_config_settings.xml index 06ddc5ce61c..94ea4c5970a 100644 --- a/addons/iap/views/res_config_settings.xml +++ b/addons/iap/views/res_config_settings.xml @@ -1,16 +1,5 @@ - - Open IAP Account - - - code - -if records: - action = records._redirect_to_iap_account() - - - res.config.settings.view.form.inherit.base.setup.iap res.config.settings